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 Filter: Access-Control-Request-Headers more than one header will cause preflight to fail #64

Closed
jchenry opened this issue Oct 15, 2013 · 1 comment

Comments

@jchenry
Copy link
Contributor

jchenry commented Oct 15, 2013

Access-Control-Request-Headers can be a comma delimited list. when more than one element is in this list, isValidAccessControlRequestHeader in cors_filter.go will fail for even valid requests.

to test:

change cors_filter_test.go:20 to:
AllowedHeaders: []string{"X-Custom-Header, X-Additional-Header"},
and line 29 to:
httpRequest.Header.Set(HEADER_AccessControlRequestHeaders, "X-Custom-Header, X-Additional-Header")

@emicklei
Copy link
Owner

I have changed the test like you described and indeed see the test failed. Will work on it now.

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