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

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.

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

https://github.com/pine3ree

Installation

Use composer: composer require lerni/samesite-cookie-patch