spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Support `by` component of `Forwarded` header
Is your feature request related to a problem? Please describe.
All of our HTTP components (mostly proxies) write Forwarded headers. That gives us some kind of traceroute of the HTTP traffic path which helps a lot when debugging. Only our Spring Cloud Gateway based part is not providing the by
attribute of the Forwarded
header. So we can't see where the traffic came from to it.
Describe the solution you'd like
It would be nice to fill the by
component of the Forwarded
header with the IP and port of the host that runs Spring Cloud Gateway. That way we can see which of our nodes received the traffic.
Describe alternatives you've considered We could add our own header for that but why would we do that if there already is a standard way to do that. ;)
Additional context
Other entries in our Forwarded
headers look like this with all attributes filled:
by=62.1.2.3:443;for=89.1.2.3:42857;host=www.mysite.com;proto=https
The entry from our Spring Cloud Gateway based component looks like this:
proto=http;host=www.myintsite.com;for="10.1.2.3:36286"
Also I still understand rfc7230#section-3.2.6 that an IPv4 address is a normal token and doesn't need to be quoted. I've also never seen official examples of a quoted IPv4 address. That should only be needed for IPv6 addresses because they contain []:
.
A TODO note is already in place :)
Any updates on this?
Another 3 months later. Any updates on this?
Now a whole year went past. Guess this project is either dead or doesn't care about standards from 2017..
Closing in favor of #2658