Differentiate Forwarded and X-Forwarded headers in proxy docs - #19477
Open
skdas20 wants to merge 1 commit into
Open
Differentiate Forwarded and X-Forwarded headers in proxy docs#19477skdas20 wants to merge 1 commit into
skdas20 wants to merge 1 commit into
Conversation
The proxy server section pointed at RFC 7239 and then told the reader to configure the application server for the X-Forwarded headers, conflating the standard Forwarded header with the non-standard X-Forwarded-* set. Describe the two kinds of headers separately, note that most proxies send X-Forwarded-* while Spring Framework and servers such as Reactor Netty and Jetty understand both, and state that the edge proxy has to drop or overwrite untrusted values for both kinds rather than only one. See spring-projectsgh-19461 Signed-off-by: Sumit Kumar Das <skdas5405@gmail.com>
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.
See gh-19461.
The proxy server section currently says:
which points at RFC 7239 and then, in the next sentence, refers to the
X-Forwarded-*headers as though they were the same mechanism. They are not: RFC 7239 defines a single standardForwardedheader, whileX-Forwarded-Host/X-Forwarded-Proto/X-Forwarded-Forare the older non-standard set.This change:
X-Forwarded-*while Spring Framework and servers such as Reactor Netty and Jetty understand both, so neither can be assumed to be the only one in use;ForwardedHeaderFilter/ForwardedHeaderTransformerhandle both kinds and can be configured to remove the headers instead of applying them.The wording follows the framing in the issue. Only
features/exploits/http.adocneeded changing — the servlet and reactive pagesxrefthis section rather than repeating it.Happy to adjust the emphasis or trim it if you had a different structure in mind; this is meant as a starting point rather than a finished opinion on the guidance.