-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve existing X-Forwarded-* headers
For X-Forwarded-Host and X-Forwarded-Proto, we should only populate these ourselves if they weren't present in the original request. If they were present, we should preserve them. Otherwise when running behind another proxy, we may lose information that it has provided. For example, where a downstream proxy terminated TLS and set `X-Forwarded-Proto` to `https`, and connects to us over plain `http`, we would have wrongly reset `X-Forwarded-Proto` to `http`, which will mislead the upstream.
- Loading branch information
1 parent
0a8da81
commit 8d19698
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters