Situation:
- AWS loadbalancer is configured to terminate TLS at the loadbalancer level
- LB hands requests over to Fabio via
http
- When a https-request is made AWS LB sets following headers before calling fabio:
X-Forwarded-For: x.x.x.x
X-Forwarded-Proto: https
- Fabio does not override the headers above, however it sets the following before passing the request to upstream:
Forwarded: for=x.x.x.x; proto=http; by=y.y.y.y
Now my application wrongly assumes that the "real" request is made via http and not https, because it consumes the Forwarded if its present, instead of X-Forwarded-For|Proto.
I am not sure if it's a problem in my application, or in fabio, as there's a discrepancy in both headers:
X-Forwarded-Proto says it's https
Forwarded says it's proto=http
Situation:
httpX-Forwarded-For: x.x.x.xX-Forwarded-Proto: httpsForwarded: for=x.x.x.x; proto=http; by=y.y.y.yNow my application wrongly assumes that the "real" request is made via
httpand nothttps, because it consumes theForwardedif its present, instead ofX-Forwarded-For|Proto.I am not sure if it's a problem in my application, or in fabio, as there's a discrepancy in both headers:
X-Forwarded-Protosays it'shttpsForwardedsays it'sproto=http