In gitlab by @Geal on Apr 11, 2016, 19:14
The current solution is very simple: generate a header Forwarded: for=client_ip;by=front_ip" and delete any Forwarded, X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Port headers provided by the client.
A more correct solution would, according to the specification, parse any of those headers in a structure assembling forwarding info, check the list of forwarded addresses (with the by element as well), delete the incoming headers, then write out a correct Forwarded header
In gitlab by @Geal on Apr 11, 2016, 19:14
The current solution is very simple: generate a header
Forwarded: for=client_ip;by=front_ip" and delete anyForwarded,X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Portheaders provided by the client.A more correct solution would, according to the specification, parse any of those headers in a structure assembling forwarding info, check the list of forwarded addresses (with the
byelement as well), delete the incoming headers, then write out a correctForwardedheader