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

Ensure allow credentials header is not emitted for disallowed origins #888

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

romanek-adam
Copy link
Contributor

When request origin doesn't match allowed origins the library adds the "allow credentials" header which seems invalid or at least redundant. In this change we ensure the "allow credentials" header is only emitted when other CORS headers are.

romanek-adam and others added 2 commits October 11, 2023 11:07
When request origin doesn't match allowed origins the library adds the "allow credentials" header which seems invalid or at least redundant. In this change we ensure the "allow credentials" header is only emitted when other CORS headers are.
@adamchainz adamchainz enabled auto-merge (squash) October 11, 2023 10:13
@adamchainz adamchainz merged commit b6a7fd7 into adamchainz:main Oct 11, 2023
6 checks passed
@adamchainz
Copy link
Owner

Thank you for the PR. I pushed some edits: moving the block down a little further for clarity, adding a regression test, and adding a changelog entry. Released in 4.3.0.

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.

2 participants