add AddResponseHeadersIfNotPresentGatewayFilterFactory#3756
Closed
JoeCqupt wants to merge 4 commits intospring-cloud:mainfrom
Closed
add AddResponseHeadersIfNotPresentGatewayFilterFactory#3756JoeCqupt wants to merge 4 commits intospring-cloud:mainfrom
JoeCqupt wants to merge 4 commits intospring-cloud:mainfrom
Conversation
Signed-off-by: joecqupt <[email protected]>
Signed-off-by: joecqupt <[email protected]>
Signed-off-by: joecqupt <[email protected]>
Contributor
Author
|
PTAL @spencergibb @ryanjbaxter |
ryanjbaxter
reviewed
Apr 17, 2025
|
|
||
|
|
||
| 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. |
Contributor
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
I take back my comment here, I think we should add the option to override the header or not to AddResponseHeader
Contributor
There was a problem hiding this comment.
This is not resolved...
Contributor
Author
There was a problem hiding this comment.
We should not add 'ResponseHeadersIfNotPresentGatewayFilter'. Instead, we should modify 'ResponseHeaderGatewayFilter' to support the override option.
You mean this?
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.
#3752