8000 Some rewording · symfony/symfony-docs@e8d16d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit e8d16d1

Browse files
Some rewording
1 parent 562832a commit e8d16d1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

console/request_context.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Configuring the Request Context Globally
2121

2222
To configure the Request Context - which is used by the URL Generator - you can
2323
redefine the parameters it uses as default values to change the default host
24-
(localhost) and scheme (http). You can also configure the base path if Symfony
25-
is not running in the root directory.
24+
(localhost) and scheme (http). You can also configure the base path (both for
25+
the URL generator and the assets) if Symfony is not running in the root directory.
2626

2727
Note that this does not impact URLs generated via normal web requests, since those
2828
will override the defaults.
@@ -37,6 +37,7 @@ will override the defaults.
3737
router.request_context.scheme: https
3838
router.request_context.base_url: my/path
3939
asset.request_context.base_path: %router.request_context.base_url%
40+
asset.request_context.secure: true
4041
4142
.. code-block:: xml
4243
@@ -50,6 +51,7 @@ will override the defaults.
5051
<parameter key="router.request_context.scheme">https</parameter>
5152
<parameter key="router.request_context.base_url">my/path</parameter>
5253
<parameter key="asset.request_context.base_path">%router.request_context.base_url%</parameter>
54+
<parameter key="asset.request_context.secure">true</parameter>
5355
</parameters>
5456
5557
</container>
@@ -61,6 +63,10 @@ will override the defaults.
6163
$container->setParameter('router.request_context.scheme', 'https');
6264
$container->setParameter('router.request_context.base_url', 'my/path');
6365
$container->setParameter('asset.request_context.base_path', $container->getParameter('router.request_context.base_url'));
66+
$container->setParameter('asset.request_context.secure', true);
67+
68+
.. versionadded:: 3.4
69+
The ``asset.request_context.*`` parameters were introduced in Symfony 3.4.
6470

6571
Configuring the Request Context per Command
6672
-------------------------------------------

0 commit comments

Comments
 (0)
0