Skip to content

Commit b8ba579

Browse files
committed
Document how web paths are build
There are common pitfalls that can be easily avoided with some configuration. Closes #828
1 parent 6ffb1bc commit b8ba579

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Resources/doc/cache-resolver/web_path.rst

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ Web Path Resolver
66

77
The ``WebPathResolver`` resolver enabled cache resolution using the
88
web path of your application.
9+
The resulting web path is computed by taking into account the request context,
10+
notably to decide which scheme to use. If you use a proxy to decrypt incoming
11+
TLS traffic, and need the resolver to generate https urls, you will need to
12+
`list trusted proxies in the configuration of the framework`_. If you also
13+
`embed controllers`_ in your templates, you will need to add the localhost to
14+
that list.
15+
The request context is also used to determine the port to specify, should it
16+
differ from standard HTTP ports like ports 80 or 443.
17+
18+
.. _`list trusted proxies in the configuration of the framework`: http://symfony.com/doc/current/components/http_foundation/trusting_proxies.html
19+
.. _`embed controllers`: https://symfony.com/doc/current/templating/embedding_controllers.html
920

1021

1122
Configuration

0 commit comments

Comments
 (0)