Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default CORS preflight status code w/ configuration #4351

Merged
merged 1 commit into from
May 1, 2022

Conversation

devinivy
Copy link
Member

This work decouples the status code used for CORS preflight responses from the server's emptyStatusCode. The CORS preflight response status code now defaults to 200 per conversation in #4165, and is configurable to 200 or 204 using request.options.cors.preflightStatusCode.

Resolves #4165

@devinivy devinivy added this to the 21.0.0 milestone Apr 26, 2022
@devinivy devinivy added feature New functionality or improvement breaking changes Change that can breaking existing code labels Apr 26, 2022
Copy link
Member

@Nargonath Nargonath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I followed the discussion in #4165 and I don't have any strong opinion on it. As you mentioned it seems there isn't any one-size-fits-all here but 200 seemed to be the most likely to go down without any trouble. If a user ever encounters a problem the option will be there for them to change the default status code so I think we're covered.

@devinivy devinivy merged commit db0cb45 into v21 May 1, 2022
@devinivy devinivy deleted the cors-preflight-status-code branch May 1, 2022 04:58
@devinivy devinivy mentioned this pull request Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants