@@ -29,17 +29,16 @@ in the Symfony configuration so that Varnish is seen as a trusted proxy and the
29
29
Routing and X-FORWARDED Headers
30
30
-------------------------------
31
31
32
- If the ``X-Forwarded-Port `` header is not set correctly, Symfony will append
33
- the port where the PHP application is running when generating absolute URLs,
34
- e.g. ``http://example.com:8080/my/path ``. To ensure that the Symfony router
35
- generates URLs correctly with Varnish, add the correct port number in the
36
- ``X-Forwarded-Port `` header. This port depends on your setup.
37
-
38
- Suppose that external connections come in on the default HTTP port 80. For HTTPS
39
- connections, there is another proxy (as Varnish does not do HTTPS itself) on the
40
- default HTTPS port 443 that handles the SSL termination and forwards the requests
41
- as HTTP requests to Varnish with a ``X-Forwarded-Proto `` header. In this case,
42
- add the following to your Varnish configuration:
32
+ To ensure that the Symfony Router generates URLs correctly with Varnish,
33
+ an ``X-Forwarded-Port `` header must be present for Symfony to use the
34
+ correct port number.
35
+
36
+ This port number corresponds to the port your setup is using to receive external
37
+ connections (``80 `` is the default value for HTTP connections). If the application
38
+ also accepts HTTPS connections, there could be another proxy (as Varnish does
39
+ not do HTTPS itself) on the default HTTPS port 443 that handles the SSL termination
40
+ and forwards the requests as HTTP requests to Varnish with an ``X-Forwarded-Proto ``
41
+ header. In this case, you need to add the following configuration snippet:
43
42
44
43
.. code-block :: varnish4
45
44
@@ -192,7 +191,7 @@ Symfony adds automatically:
192
191
.. tip ::
193
192
194
193
If you followed the advice about ensuring a consistent caching
195
- behavior , those vcl functions already exist. Just append the code
194
+ behaviour , those VCL functions already exist. Just append the code
196
195
to the end of the function, they won't interfere with each other.
197
196
198
197
.. index ::
0 commit comments