Closed 3DFace closed 1 year ago
Ok, now the question is just what to do with it inside the marshalling logic :D
Ok, now the question is just what to do with it inside the marshalling logic :D
I'd say we should provide the pre-fix solution. I can not have a look into it right now but lets see what the outcome of my question is
BTW this is my first ever pull-request. I will be grateful for explicit instructions if any actions are expected from me.
@3DFace so far, all is correct, now we just need to fix this :D
If you have a clear idea of what is needed, you can just push new commits to your branch (with the proposed changes), otherwise somebody else will take your commits and propose a patch.
If you have time and capacity, then just give it a shot: change the sources that affect this test outcome, until the tests are all green again.
As for the other 5 unrelated commits: I will get rid of them before merging, or they can be rebased out: that's because this is a bugfix, so it should go to 2.13.x
(next patch release branch), and your patch started from the default branch (2.14.x
).
That's not a big problem though, and can be addressed later.
As for the other 5 unrelated commits
Thank you for clarifications! I was a bit confused about it.
I've created a fix in #111
Due to the fact that at least apache is blindly passing Host
header via X-Forwarded-Host
and the Host
header allows containing a port (even tho it won't do anything), I'd say the correct behavior would be to simply ignore the port from X-Forwarded-Host
.
If the behavior should be that we are able to determine the initial request / port, we shouldn't use X-Forwarded-Host
or X-Forwarded-Port
as thats always those values from the latest proxy (at least that is what I would assume, not sure if proxies do actually pass these values in case they're existing).
Instead, we might want to use Forwarded
which contains the whole history (in correct order) of all proxies which interacted with the request containing the hostnames they received. But that would be a whole another topic.
In the OP scenario, that would be traefik. We are only able to determine those headers from NGINX which are most probably not those we might want to use here.
@boesing Should we close this in favor of the solution in #135?
@weierophinney would be fine for me, I guess the issue is covered?
Signed-off-by: Denis Ponomarev ponomarev@gmail.com
Description
FilterUsingXForwardedHeaders
should accepthost:port
pair inX-FORWARDED-HOST
header.Test added to detect it parsed incorrectly.