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

Should ExposedHeaders be filtered by actual response headers? #19

Closed
aleksandr-vin opened this issue Jan 17, 2016 · 1 comment
Closed

Comments

@aleksandr-vin
Copy link

I need to expose Location header for only some responses (like to POST request), in most other responses there is no Location header in responses.

Should it filter ExposedHeaders by response headers already presented in? Or it depends on the order of middleware setup?

Also it will add a time penalty for processing that filter. So the main purpose of this issue is: is it OK to add Access-Control-Expose-Headers: XXX header without XXX header in the response?

@elithrar
Copy link

Yes, it is OK to expose the Location HTTP header, even if it is only sometimes in a response.

Note that the endpoint the Location header points to will also need the correct CORS setup (you can't re-direct to another domain and ignore their CORS configuration).

@rs rs closed this as completed Jun 8, 2017
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

3 participants