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

Handle Access-Control-Allowed-Headers in CORS preflight #4

Open
jakedt opened this issue May 9, 2017 · 4 comments
Open

Handle Access-Control-Allowed-Headers in CORS preflight #4

jakedt opened this issue May 9, 2017 · 4 comments

Comments

@jakedt
Copy link

jakedt commented May 9, 2017

The CORS implementation added by the fix/preflight branch is incomplete. You must also respond to the headers requests. My client (graphiql on chrome) is trying to use a content-type header, and is therefore being rejected.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Headers

Also, kind of surprising that CORS is enabled by default. You may want to put a warning somewhere in the readme!

@jakedt
Copy link
Author

jakedt commented May 9, 2017

Just found the build-in graphiql support, doesn't change the issue but is a great workaround in the meantime. Thanks!

@grazor
Copy link
Member

grazor commented May 9, 2017

Hi @jakedt !

Thanks for report, I'll look into it soon.

I guess you are right about enabling CORS by default, I'll add an option for it.

@ahopkins
Copy link

I got tripped up by this too. Is anyone doing something on this? If not, I might add a PR.

@dpnova
Copy link
Contributor

dpnova commented Sep 3, 2017

CORS(app, automatic_options=True) - I did this to get things working. Doesn't fix the real issue here, but at least is a work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants