Skip to content

Commit e9d4382

Browse files
committed
Documented how to force router to use https schema
1 parent 1fde57c commit e9d4382

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

routing/scheme.rst

+8
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,11 @@ to always use ``http``.
9494
to secure an "area" of your website (all URLs under ``/admin``) or when
9595
you want to secure URLs defined in a third party bundle (see
9696
:doc:`/security/force_https` for more details).
97+
98+
.. note::
99+
100+
When a script is running in CLI mode (e.g Symfony commands or messenger workers)
101+
the router context is not defined and you may want to force the router to always
102+
generate https or http urls. This can be achieved with specifying
103+
``router.request_context.scheme: 'https'`` in your parameters. (see
104+
:doc:`/console/request_context.rst` for more details).

0 commit comments

Comments
 (0)