Describe the bug π
While working on #273 I found out that
- "traefik.http.middlewares.bouncer-test.plugin.bouncer.forwardedheaderstrustedips=172.20.0.1/32"
- "traefik.http.middlewares.bouncer-test.plugin.bouncer.forwardedheaderscustomname=X-Forwarded-For"
Does not behave as:
- "traefik.http.middlewares.bouncer-test.plugin.bouncer.forwardedheaderstrustedips=0.0.0.0/8"
- "traefik.http.middlewares.bouncer-test.plugin.bouncer.forwardedheaderscustomname=X-Forwarded-For"
My expectation is that they would. I am either not getting something, or the implementation we rely on (ip.GetRemoteIP) is weird.
When using 0.0.0.0/8 the forwardedheaderscustomname is actually ignored, and the remoteAddr is used always.
As I read it:
- forwardedheaderstrustedips means "you can trust the contents of forwardedheaderscustomname when the remoteAddr - that is the real IP connecting to us - is in forwardedheaderstrustedips"
Expected behavior π
Not sure.