File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,72 @@ user logs out::
428
428
],
429
429
]);
430
430
431
+ clear_site_data
432
+ ~~~~~~~~~~~~~~~
433
+
434
+ **type **: ``array `` **default **: ``[] ``
435
+
436
+ The Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website.
437
+ It allows web developers to have more control over the data stored by a client browser for their origins.
438
+ Allowed values are ``cache ``, ``cookies ``, ``storage `` and ``executionContexts ``.
439
+ And it's possible to use ``* `` as a wildcard for all directives::
440
+
441
+ .. configuration-block ::
442
+
443
+ .. code-block :: yaml
444
+
445
+ # config/packages/security.yaml
446
+ security :
447
+ # ...
448
+
449
+ firewalls :
450
+ main :
451
+ # ...
452
+ logout :
453
+ clear_site_data :
454
+ - cookies
455
+ - storage
456
+
457
+ .. code-block :: xml
458
+
459
+ <!-- config/packages/security.xml -->
460
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
461
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
462
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
463
+ xmlns : srv =" http://symfony.com/schema/dic/services"
464
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
465
+ https://symfony.com/schema/dic/services/services-1.0.xsd" >
466
+
467
+ <config >
468
+ <!-- ... -->
469
+
470
+ <firewall name =" main" >
471
+ <!-- ... -->
472
+ <logout path =" ..." >
473
+ <clear-site-data >cookies</clear-site-data >
474
+ <clear-site-data >storage</clear-site-data >
475
+ </logout >
476
+ </firewall >
477
+ </config >
478
+ </srv : container >
479
+
480
+ .. code-block :: php
481
+
482
+ // config/packages/security.php
483
+ $container->loadFromExtension('security', [
484
+ // ...
485
+ 'firewalls' => [
486
+ 'main' => [
487
+ 'logout' => [
488
+ 'delete_cookies' => [
489
+ 'cookies',
490
+ 'storage',
491
+ ],
492
+ ],
493
+ ],
494
+ ],
495
+ ]);
496
+
431
497
invalidate_session
432
498
~~~~~~~~~~~~~~~~~~
433
499
You can’t perform that action at this time.
0 commit comments