Download the PHP package selective/samesite-cookie without Composer
On this page you can find all versions of the php package selective/samesite-cookie. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download selective/samesite-cookie
More information about selective/samesite-cookie
Files in selective/samesite-cookie
Package samesite-cookie
Short Description Secure your site with SameSite cookies
License MIT
Homepage https://github.com/selective-php/samesite-cookie
Informations about the package samesite-cookie
selective/samesite-cookie
A PSR-15 middleware to secure your site with SameSite cookies :cookie:
Requirements
- PHP 8.1+
Installation
SameSite cookies
Same-site cookies ("First-Party-Only" or "First-Party") allow servers to mitigate the risk of CSRF and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registrable domain.
Warning: SameSite cookies doesn't work at all for old Browsers and also not for some Mobil Browsers e.g. IE 10, Blackberry, Opera Mini, IE Mobile, UC Browser for Android.
Further details can be found here:
- SameSite cookies explained
- CSRF is (really) dead
- PHP setcookie “SameSite=Strict”?
- How to Set a cookie attribute Samesite value in PHP ?
- Can I use SameSite?
Slim 4 integration
Example with configuration and the session starter middleware.
Slim 4 uses a LIFO (last in, first out) middleware stack, so we have to add the middleware in reverse order:
License
The MIT License (MIT). Please see License File for more information.
All versions of samesite-cookie with dependencies
psr/http-message Version ^1
psr/http-server-handler Version ^1
psr/http-server-middleware Version ^1