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

Simplify Whitelisted Headers #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rymndhng
Copy link
Contributor

@rymndhng rymndhng commented Mar 5, 2016

Refactor simple-headers-wo-content-type to access-control-request-headers-whitelist.

The whitelist behaves differently by set/difference-ing
access-control-request-headers instead of set/union the
access-control-allowed-headers. This way, we do not put unnecessary
headers in the response access-control-allowed-headers.

From testing, the only required header in the whitelist is
"Origin". Safari always sends this in "Access-Control-Request-Headers"
during pre-flight, whereas the Firefox and Chrome do not.

Refactor simple-headers-wo-content-type to access-control-request-headers-whitelist.

The whitelist behaves differently by `set/difference`-ing
`access-control-request-headers` instead of `set/union` the
`access-control-allowed-headers`. This way, we do not put unnecessary
headers in the response `access-control-allowed-headers`.

From testing, the only required header in the whitelist is
"Origin". Safari always sends this in "Access-Control-Request-Headers"
during pre-flight, whereas the Firefox and Chrome do not.
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

1 participant