-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: joecqupt <[email protected]>
Signed-off-by: joecqupt <[email protected]>
Signed-off-by: joecqupt <[email protected]>
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. |
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.
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
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.
I take back my comment here, I think we should add the option to override the header or not to AddResponseHeader
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.
This is not resolved...
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.
We should not add 'ResponseHeadersIfNotPresentGatewayFilter'. Instead, we should modify 'ResponseHeaderGatewayFilter' to support the override option.
You mean this?
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.
Yes exactly
#3752