Skip to content

add AddResponseHeadersIfNotPresentGatewayFilterFactory #3756

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JoeCqupt
Copy link
Contributor

@JoeCqupt JoeCqupt commented Apr 10, 2025

Signed-off-by: joecqupt <[email protected]>
@JoeCqupt
Copy link
Contributor Author

PTAL @spencergibb @ryanjbaxter



This listing adds 2 headers `X-Response-Color-1:blue` and `X-Response-Color-2:green` to the downstream response's headers for all matching requests.
This is similar to how `AddResponseHeader` works, but unlike `AddResponseHeader` it will do it only if the header is not already there.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be useful to also add the option to override the header if it is present? The default could be to do nothing if the header is there but we could add a configuration option to allow the override behavior

cc: @spencergibb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants