cors: do not modify response headers for requests not matching origin#33133
Merged
wbpcode merged 1 commit intoenvoyproxy:mainfrom Mar 29, 2024
Merged
cors: do not modify response headers for requests not matching origin#33133wbpcode merged 1 commit intoenvoyproxy:mainfrom
wbpcode merged 1 commit intoenvoyproxy:mainfrom
Conversation
…ured origin. Signed-off-by: Christoph Pakulski <paker8848@gmail.com>
Member
|
Thanks a lot. 🌹 |
Contributor
Author
|
Thanks for reviewing @wbpcode! (IMHO reviewing is harder than coding). |
alyssawilk
pushed a commit
to alyssawilk/envoy
that referenced
this pull request
Apr 29, 2024
…envoyproxy#33133) cors: Do not modify response headers for requests not matching configured origin. Signed-off-by: Christoph Pakulski <paker8848@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
cors: Do not modify response headers for requests not matching origin
Additional Description:
Regular cors requests (not preflights), which did not match configured allowed origins are forwarded upstream to the server. It seems that treatment of responses to such requests was undefined. There was no documentation, no unit nor integration tests which enforced whether extra headers should be added to responses to such request. Before #33051, the headers were not added and after the #33051 headers were added. This PR brings the behaviour to original and headers are not added. Docs have been updated and unit test was added to enforce this behaviour.
Risk Level: Low
Testing: Added unit test.
Docs Changes: Updated.
Release Notes: No
Platform Specific Features: No
Fixes #33086