@@ -21,8 +21,8 @@ Configuring the Request Context Globally
21
21
22
22
To configure the Request Context - which is used by the URL Generator - you can
23
23
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.
26
26
27
27
Note that this does not impact URLs generated via normal web requests, since those
28
28
will override the defaults.
@@ -37,6 +37,7 @@ will override the defaults.
37
37
router.request_context.scheme : https
38
38
router.request_context.base_url : my/path
39
39
asset.request_context.base_path : %router.request_context.base_url%
40
+ asset.request_context.secure : true
40
41
41
42
.. code-block :: xml
42
43
@@ -50,6 +51,7 @@ will override the defaults.
50
51
<parameter key =" router.request_context.scheme" >https</parameter >
51
52
<parameter key =" router.request_context.base_url" >my/path</parameter >
52
53
<parameter key =" asset.request_context.base_path" >%router.request_context.base_url%</parameter >
54
+ <parameter key =" asset.request_context.secure" >true</parameter >
53
55
</parameters >
54
56
55
57
</container >
@@ -61,6 +63,10 @@ will override the defaults.
61
63
$container->setParameter('router.request_context.scheme', 'https');
62
64
$container->setParameter('router.request_context.base_url', 'my/path');
63
65
$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.
64
70
65
71
Configuring the Request Context per Command
66
72
-------------------------------------------