lerni / samesite-cookie-patch
This package is abandoned and no longer maintained.
No replacement package was suggested.
SilverStripe 4.8 Composer installable patch to add SameSite Cookie - PR 9920 silverstripe/framework
dev-master
2022-06-03 12:44 UTC
Requires
This package is auto-updated.
Last update: 2023-03-31 14:19:40 UTC
README
This module patches according to silverstripe/silverstripe-framework#9920. With #10335 this is obsolet - 4.12 probable.
- https://www.youtube.com/watch?v=Fet6-IiX69E&list=RDCMUCnUYZLuoy1rq1aVMwx4aTzw&index=1
- https://web.dev/samesite-cookies-explained/
- https://blog.chromium.org/2020/01/building-more-private-web-path-towards.html
How it works
As in the PR stated you need to add...
// e.g. src/app/_config.php
//...
use SilverStripe\Control\Cookie;
use SilverStripe\Control\Session;
//...
// new configuration property for Cookie
Cookie::config()->set('samesite', 'Lax');
// new configuration property for Session
Session::config()->set('cookie_samesite', 'Lax');
Requirements
- SilverStripe ~4.8 (just tested with that)
Credits
Installation
Use composer:
composer require lerni/samesite-cookie-patch