Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes all support for
X-Forwarded-Port
in the URL builder. This header is not informative for determining the host given by the client. Updated the logic to always prefer the standardForwarded
header over the non-standardX-Forwarded-*
headers when provided. Only use thehost
parameter of theForwarded
header and never use thefor
parameter, which is incorrect for setting as the server host.Note the original reason for providing support for
X-Forwarded-Port
was related to a bug in a load balancer (see reference in #2008). Amazon ELB always setsX-Forwarded-Port
regardless of whether the port is specified in theHost
header, and leaves the originalHost
header alone. The goal of the URL builder is to recreate the host exactly as given by the client, which this header is useless for.Carry #2214
Partially reverts #2008
Fixes #2177
Please review this so we can get a patch release for 2.6
Ping @tt @stevvooe @aaronlehmann @miminar @nwt @marcusmartins