@@ -21,8 +21,8 @@ Configuring the Request Context Globally
2121
2222To configure the Request Context - which is used by the URL Generator - you can
2323redefine 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
2727Note that this does not impact URLs generated via normal web requests, since those
2828will 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
6571Configuring the Request Context per Command
6672-------------------------------------------
0 commit comments