-
Notifications
You must be signed in to change notification settings - Fork 222
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
Add Access-Control-Allow-Origin before aborting #54
Comments
Re-reading the spec, I'm not sure we should stop the processing of the preflight request until there is a parsing error. I might revisit this. |
When the browser uses Should I open a separate issue or are we talking about the same thing? |
Yes, I think it's a different issue. |
@tj For what it's worth, I mentioned this issue in my latest my blog post. |
Related: whatwg/fetch#1588 |
FWIW, I've implemented some debug mode in jub0bs/cors that changes the way the middleware composes responses to preflight requests, and which can be toggled on the fly. Perhaps something to consider for rs/cors. |
I plan on sending a PR at some point, just opening this for reference or if someone else wants to grab it.
I think here if we respond with
Access-Control-Allow-Origin
first it'll lead to nicer browser errors, and require fewer trips to enabling debugging with this middleware to discover what went wrong.Currently this kind of masks issues with the other fields, so the browser basically just says you don't have access at all. Let me know if that sounds reasonable!
The text was updated successfully, but these errors were encountered: