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

CORS not restricting domains #16

Closed
aleemb opened this issue Aug 12, 2016 · 1 comment
Closed

CORS not restricting domains #16

aleemb opened this issue Aug 12, 2016 · 1 comment

Comments

@aleemb
Copy link

aleemb commented Aug 12, 2016


Expected behaviour:

Run the example-projects/web-api-custom-cors and test the following request:

curl 'https://xxxxxxx.execute-api.eu-west-1.amazonaws.com/latest/echo' -H 'Origin: https://www.foo.bar' -vvvv

Should not return following header since Origin is not claudiajs.com:

Access-Control-Allow-Origin: *

What actually happens:

Returns header:

Access-Control-Allow-Origin: *
@gojko
Copy link
Member

gojko commented Aug 12, 2016

you forgot -X OPTIONS for preflight requests in Curl. Browsers use that to determine CORS

@gojko gojko closed this as completed Aug 12, 2016
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