-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: net/http/httputil: support RFC 7239 Forwarded header in ReverseProxy #20526
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
Comments
The suggestion seems fine, but @bradfitz has the final say. A consideration is whether the addition of a "Forwarded" header is worth the extra bytes we dump out on the network. The internet at large already understands "X-Forwarded-For". It will be a long time (if ever) before "Forwarded" replaces "X-Forwarded-For", so people will be forced to implement understanding both. It doesn't seem like the utility is that great. |
Adoption of the One reason why |
What software does recognize Forwarded today? There's a question of recognizing the new header vs generating the new header. Recognizing both seems OK. There's no point in generating a header that nothing else recognizes though. Should we really generate both? Should we translate X-Forwarded-For into Forwarded? Should we translate Forwarded into X-Forwarded-For? |
Still waiting for answers to the above. Ping @c960657 ? |
The It is also supported by the Gorilla web toolkit and forwarded-http Node library. The header is not supported by Apache mod_proxy_http, Ruby on Rails, WordPress or MediaWiki. All of the above support X-Forwarded-For and to some extend the other X-Forwarded-xxx headers. So no, the |
If we just don't do this, and we wait until there's a more compelling need, what bad things would happen? Is there some minimal amount we should do today, or should we just postpone everything until later? |
Ping? Should we just postpone this? |
Sounds like there's no compelling reason to do this. We can reconsider in the future if things change. |
If we want to do something, but our main concern is not adding more bytes to our request payload, we could parse incoming This would allow downstream proxies to support only So I don’t object to closing this issue :-) |
I'd be fine with recognizing |
ReverseProxy injects the de facto standard header
X-Forwarded-For
.RFC 7239 defines a new header,
Forwarded
, that offers the same functionality asX-Forwarded-For
and more.I suggest that ReverseProxy get support for
Forwarded: for=...
in addition toX-Forwarded-For
.The text was updated successfully, but these errors were encountered: