-
Notifications
You must be signed in to change notification settings - Fork 4.9k
cors filter: add vary origin header #38868
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Suresh Kumar Ponnusamy <[email protected]> Signed-off-by: Suresh Kumar Ponnusamy <[email protected]>
Signed-off-by: Suresh Kumar Ponnusamy <[email protected]> Signed-off-by: Suresh Kumar Ponnusamy <[email protected]>
// Add Vary: Origin header when origin is not "*" | ||
if (latched_origin_ != "*") { | ||
headers.appendCopy(Http::CustomHeaders::get().Vary, "origin"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen if the upstream reponse header has set vary:origin
?
I think you can take the CompressorFilter::insertVaryHeader
of /source/source/extensions/filters/http/compressor/compressor_filter.cc
as an example about how to update the vary origin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution and one comment is added. And please also check the CI. :)
/wait |
Commit Message: cors filter: add vary origin header
Additional Description:
Risk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #35873]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]