diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index f0f28a00180..73c303aed79 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -428,6 +428,72 @@ user logs out:: ], ]); +clear_site_data +~~~~~~~~~~~~~~~ + +**type**: ``array`` **default**: ``[]`` + +The Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website. +It allows web developers to have more control over the data stored by a client browser for their origins. +Allowed values are ``cache``, ``cookies``, ``storage`` and ``executionContexts``. +And it's possible to use ``*`` as a wildcard for all directives:: + +.. configuration-block:: + + .. code-block:: yaml + + # config/packages/security.yaml + security: + # ... + + firewalls: + main: + # ... + logout: + clear_site_data: + - cookies + - storage + + .. code-block:: xml + + + + + + + + + + + + cookies + storage + + + + + + .. code-block:: php + + // config/packages/security.php + $container->loadFromExtension('security', [ + // ... + 'firewalls' => [ + 'main' => [ + 'logout' => [ + 'clear-site-data' => [ + 'cookies', + 'storage', + ], + ], + ], + ], + ]); + invalidate_session ~~~~~~~~~~~~~~~~~~