File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,18 @@ the URI scheme via schemes:
4848 The above configuration forces the ``secure `` route to always use HTTPS.
4949
5050When generating the ``secure `` URL, and if the current scheme is HTTP, Symfony
51- will automatically generate an absolute URL with HTTPS as the scheme:
51+ will automatically generate an absolute URL with HTTPS as the scheme, even when
52+ using the ``path() `` function:
5253
5354.. code-block :: twig
5455
5556 {# If the current scheme is HTTPS #}
5657 {{ path('secure') }}
57- {# generates /secure #}
58+ {# generates a relative URL: /secure #}
5859
5960 {# If the current scheme is HTTP #}
6061 {{ path('secure') }}
61- {# generates https://example.com/secure #}
62+ {# generates an absolute URL: https://example.com/secure #}
6263
6364 The requirement is also enforced for incoming requests. If you try to access
6465the ``/secure `` path with HTTP, you will automatically be redirected to the
You can’t perform that action at this time.
0 commit comments