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:
48
48
The above configuration forces the ``secure `` route to always use HTTPS.
49
49
50
50
When 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:
52
53
53
54
.. code-block :: twig
54
55
55
56
{# If the current scheme is HTTPS #}
56
57
{{ path('secure') }}
57
- {# generates /secure #}
58
+ {# generates a relative URL: /secure #}
58
59
59
60
{# If the current scheme is HTTP #}
60
61
{{ path('secure') }}
61
- {# generates https://example.com/secure #}
62
+ {# generates an absolute URL: https://example.com/secure #}
62
63
63
64
The requirement is also enforced for incoming requests. If you try to access
64
65
the ``/secure `` path with HTTP, you will automatically be redirected to the
You can’t perform that action at this time.
0 commit comments