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

make_callback does not support preflight requests for CORS #187

Open
emillon opened this issue Feb 10, 2020 · 1 comment
Open

make_callback does not support preflight requests for CORS #187

emillon opened this issue Feb 10, 2020 · 1 comment

Comments

@emillon
Copy link

emillon commented Feb 10, 2020

Hi,

When the client is on a different origin than the server, the client sends a preflight OPTIONS request to OGS, which returns a 404:

| _ -> respond_string ~status:`Not_found ~body:"" ()

That prevents directly using make_callback in this scenario.

What do you think about adding a ?allowed_origins optional parameter that adds the right handler to OPTIONS /graphql? I'm happy to provide a patch.

Thanks!

@andreas
Copy link
Owner

andreas commented Feb 10, 2020

Yes, that would be great 😄

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

2 participants