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

Add Access-Control-Expose-Headers #120

Merged
merged 1 commit into from Jan 24, 2017
Merged

Conversation

ianmcorvidae
Copy link
Contributor

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

While Access-Control-Allow-Headers lists the things (on a preflight request ref ) which lists which HTTP headers will be available via Access-Control-Expose-Headers when making the actual request. But, this doesn't work if there's no Access-Control-Expose-Headers on the real requests, so some browsers will deny things as unsafe headers when they're outside of the list of hardcoded safe headers (https://developer.mozilla.org/en-US/docs/Glossary/Simple_response_header) (Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma).

I've also added Content-Range and Range to the headers, which are necessary for letting JS do much of anything useful with chunked requests.

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

While Access-Control-Allow-Headers lists the things (on a preflight request [ref](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) ) which lists which HTTP headers will be available via Access-Control-Expose-Headers when making the actual request. But, this doesn't work if there's no Access-Control-Expose-Headers on the real requests, so some browsers will deny things as unsafe headers when they're outside of the list of hardcoded safe headers (https://developer.mozilla.org/en-US/docs/Glossary/Simple_response_header) (Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma).

I've also added Content-Range and Range to the headers, which are necessary for letting JS do much of anything useful with chunked requests.
@monsur monsur merged commit 1cc2baa into monsur:gh-pages Jan 24, 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

Successfully merging this pull request may close these issues.

None yet

2 participants