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
Enable X-Forwarded Headers. #748
Enable X-Forwarded Headers. #748
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #748 +/- ##
============================================
+ Coverage 78.48% 79.11% +0.62%
+ Complexity 549 543 -6
============================================
Files 66 66
Lines 2045 2030 -15
Branches 281 276 -5
============================================
+ Hits 1605 1606 +1
+ Misses 282 264 -18
- Partials 158 160 +2
|
Can you please explain why this is needed? Feign isn't a proxy |
hello @spencergibb , |
Refer to RestTemplate and WebClient . Check Set 'X-Forwarded-*' header when using loadbalanced RestTemplate issus, Don't know why OpenFeign doesn't provide support |
hello @spencergibb , Please consider merging this PR |
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.
Hello @galaxy-sea , thanks for submitting the PR. Looks good. There's a cosmetic issue - have added comment - please address. Also, please document this feature in spring-cloud-openfeign.adoc
.
...java/org/springframework/cloud/openfeign/loadbalancer/XForwardedHeadersTransformerTests.java
Outdated
Show resolved
Hide resolved
hello @OlgaMaciaszek , I have updated the document, |
I think these documents should be placed in |
@galaxy-sea it is already documented there. But it's good to reiterate here, since we add the code separately (there's no full parity between the OF LB client and the Commons LB clients). |
@OlgaMaciaszek, Thank you for unlocking my doubts |
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, @galaxy-sea . LGTM.
spring.cloud.loadbalancer.x-forwarded.enabled=true
to Enable X-Forwarded Headers.