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 93402a1

Browse filesBrowse files
TomiSweaverryan
authored andcommitted
whitespace characters and line feeds
1 parent 1008b83 commit 93402a1
Copy full SHA for 93402a1

File tree

Expand file treeCollapse file tree

1 file changed

+14
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-10
lines changed

‎cookbook/cache/varnish.rst

Copy file name to clipboardExpand all lines: cookbook/cache/varnish.rst
+14-10Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,26 @@ that will invalidate the cache for a given resource:
179179
Routing
180180
------------------
181181

182-
To ensure that the Symfony Router generates urls correctly with Varnish, proper ```X-Forwarded``` headers must be added. Headers depend on how you have configured hosts and ports for the web server and Varnish but this example should work if the web server is using the same IP as Varnish but a different port (e.g. 8080).
182+
To ensure that the Symfony Router generates urls correctly with Varnish,
183+
proper ```X-Forwarded``` headers must be added. Headers depend on how you
184+
have configured hosts and ports for the web server and Varnish but this
185+
example should work if the web server is using the same IP as Varnish but
186+
a different port (e.g. 8080).
183187

184188
.. code-block:: text
185189
186-
sub vcl_recv {
187-
if (req.http.X-Forwarded-Proto == "https" ) {
188-
set req.http.X-Forwarded-Port = "443";
189-
} else {
190-
set req.http.X-Forwarded-Port = "80"
191-
}
192-
}
190+
sub vcl_recv {
191+
if (req.http.X-Forwarded-Proto == "https" ) {
192+
set req.http.X-Forwarded-Port = "443";
193+
} else {
194+
set req.http.X-Forwarded-Port = "80"
195+
}
196+
}
193197
194198
.. note::
195199

196-
Remember to set framework.trust_proxy_headers: true in the Symfony configuration for this to work.
200+
Remember to set framework.trust_proxy_headers: true in the Symfony
201+
configuration for this to work.
197202

198203
.. _`Edge Architecture`: http://www.w3.org/TR/edge-arch
199204
.. _`GZIP and Varnish`: https://www.varnish-cache.org/docs/3.0/phk/gzip.html
200-

0 commit comments

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