Skip to content

Change default CORS preflight status code w/ configuration#4351

Merged
devinivy merged 1 commit intov21from
cors-preflight-status-code
May 1, 2022
Merged

Change default CORS preflight status code w/ configuration#4351
devinivy merged 1 commit intov21from
cors-preflight-status-code

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

Comments