fabio currently supports only a simple version of the X-Forwarded-For headers which only contains the remote ip address. The X-Forwarded-For header and the newer Forwarded header have more complex formats and also require the detection of the local ip address.
I think it should be changed as follows:
When the proxy.header.clientip header value is set to X-Forwarded-For then it should behave like it, i.e. set it to <remote ip>, <local ip> if not set or add , <local ip> if already set.
In addition the Forwarded header should be honored every time, i.e. set it if it hasn't been set or augment it if was already set.
I'm still thinking whether a force option is necessary to prevent spoofing the remote ip.
fabio currently supports only a simple version of the X-Forwarded-For headers which only contains the remote ip address. The
X-Forwarded-Forheader and the newerForwardedheader have more complex formats and also require the detection of the local ip address.I think it should be changed as follows:
When the
proxy.header.clientipheader value is set toX-Forwarded-Forthen it should behave like it, i.e. set it to<remote ip>, <local ip>if not set or add, <local ip>if already set.In addition the
Forwardedheader should be honored every time, i.e. set it if it hasn't been set or augment it if was already set.I'm still thinking whether a
forceoption is necessary to prevent spoofing the remote ip.