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 a63c5a6

Browse filesBrowse files
committed
add support for custom headers when using a proxy
1 parent 6d5f268 commit a63c5a6
Copy full SHA for a63c5a6

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed

‎deployment/proxies.rst

Copy file name to clipboardExpand all lines: deployment/proxies.rst
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,20 @@ other information.
7878

7979
.. _`security groups`: http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html
8080
.. _`RFC 7239`: http://tools.ietf.org/html/rfc7239
81+
82+
Custom Headers When Using a Reverse Proxy
83+
-----------------------------------------
84+
85+
Some reverse proxies (like CloudFront with ``CloudFront-Forwarded-Proto``) may force you to use a custom header.
86+
For instance you have ``Custom-Forwarded-Proto`` instead of ``X-Forwarded-Proto``.
87+
88+
In this case, you'll need to set the header ``X-Forwarded-Proto`` with the value of
89+
``Custom-Forwarded-Proto`` early enough in your application, i.e. before handling the request::
90+
91+
// web/app.php
92+
93+
// ...
94+
$_SERVER['HEADER_X_FORWARDED_PROTO'] = $_SERVER['HEADER_CUSTOM_FORWARDED_PROTO'];
95+
// ...
96+
$response = $kernel->handle($request);
97+

0 commit comments

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