Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 31be485

Browse filesBrowse files
committed
minor #15910 [HttpFoundation] 14114 header option 'X-Forwarded-Prefix' (JohJohan)
This PR was submitted for the 5.2 branch but it was merged into the 5.3 branch instead. Discussion ---------- [HttpFoundation] 14114 header option 'X-Forwarded-Prefix' Fixes #14114. Should i also document something about using it with traefik? `@jeff1985` you might be able to anwser that as you added the code with symfony/symfony#37734 Could a label `hacktoberfest-accepted` be added to this pull request? I am participating https://hacktoberfest.digitalocean.com/details Commits ------- c670141 14114 [HttpFoundation] header option 'X-Forwarded-Prefix'
2 parents 9935994 + c670141 commit 31be485
Copy full SHA for 31be485

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎deployment/proxies.rst

Copy file name to clipboardExpand all lines: deployment/proxies.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and what headers your reverse proxy uses to send information:
3434
# the IP address (or range) of your proxy
3535
trusted_proxies: '192.0.0.1,10.0.0.0/8'
3636
# trust *all* "X-Forwarded-*" headers
37-
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port']
37+
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix']
3838
# or, if your proxy instead uses the "Forwarded" header
3939
trusted_headers: ['forwarded']
4040
@@ -59,6 +59,7 @@ and what headers your reverse proxy uses to send information:
5959
<framework:trusted-header>x-forwarded-host</framework:trusted-header>
6060
<framework:trusted-header>x-forwarded-proto</framework:trusted-header>
6161
<framework:trusted-header>x-forwarded-port</framework:trusted-header>
62+
<framework:trusted-header>x-forwarded-prefix</framework:trusted-header>
6263
6364
<!-- or, if your proxy instead uses the "Forwarded" header -->
6465
<framework:trusted-header>forwarded</framework:trusted-header>
@@ -75,7 +76,7 @@ and what headers your reverse proxy uses to send information:
7576
// the IP address (or range) of your proxy
7677
->trustedProxies('192.0.0.1,10.0.0.0/8')
7778
// trust *all* "X-Forwarded-*" headers (the ! prefix means to not trust those headers)
78-
->trustedHeaders(['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port'])
79+
->trustedHeaders(['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix'])
7980
// or, if your proxy instead uses the "Forwarded" header
8081
->trustedHeaders(['forwarded'])
8182
;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.