-
Notifications
You must be signed in to change notification settings - Fork 31
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
Preflight checks with CORS #39
Comments
The default behavior does avoid that issue. See the docs for the Perhaps you were overriding it in your application by just providing |
Yes, you are right. I copied the example from https://github.com/loanzen/falcon-auth#usage |
Ah, that's unfortunate that the example code removes the |
Hi!
I found that the web browser (and probably any client that support cors) when it makes a request (either GET, PUT or POST) to another domain it first attempts to do an OPTION request in order to verify the cors headers. This way it checks the domains allowed and haeders. But this OPTIONS request is always sent without the authorization header. That means, with the default falcon-cors configuration, that the cors are going to fail with a 401 code (authorization header not found), and it is weird because you actually do the request with the headers in.
You can easily fix that by exepting the authentication for OPTIONS method:
But I think will be better to add some aclaration in the docs or even change the default behaiviour to avoid this issue. What do you think?
The text was updated successfully, but these errors were encountered: