Open
Conversation
bf7f770 to
b02e08f
Compare
spencergibb
reviewed
Nov 11, 2025
| } | ||
| catch (UnknownHostException e) { | ||
| this.logger.warn("Can not resolve host address, skipping Forwarded 'by' header", e); | ||
| this.log.warn("Can not resolve host address, skipping Forwarded 'by' header", e); |
Member
There was a problem hiding this comment.
Should also remove this. since it is now referencing the static log
Author
There was a problem hiding this comment.
Thank you, @spencergibb !
I’ve removed this. and rebased onto main.
Signed-off-by: matsumo-and <yh134.toisanda@gmail.com>
ae6067e to
b668f4e
Compare
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.
The
ForwardedHeadersFilterclass currently defines two Logger instances:one is a static member
spring-cloud-gateway/spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/headers/ForwardedHeadersFilter.java
Line 49 in 348ad0c
and the other is an instance member
spring-cloud-gateway/spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/headers/ForwardedHeadersFilter.java
Line 53 in 348ad0c
Having both is redundant and can cause confusion.
This PR removes the instance-level Logger and uses the static one consistently.