File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -390,11 +390,13 @@ If the browser supports the `sameSite` setting it will only include the cookie a
390
390
You may read the [ SameSite wiki article] ( https://owasp.org/www-community/SameSite ) for more details.
391
391
For better security, an exception will be thrown if ` sameSite ` is used with an unsupported version of PHP.
392
392
To use this feature across different PHP versions check the version first. E.g.
393
+
393
394
``` php
394
395
[
395
396
'sameSite' => PHP_VERSION_ID >= 70300 ? yii\web\Cookie::SAME_SITE_LAX : null,
396
397
]
397
398
```
399
+
398
400
> Note: Since not all browsers support the ` sameSite ` setting yet, it is still strongly recommended to also include
399
401
[ additional CSRF protection] ( security-best-practices.md#avoiding-csrf ) .
400
402
You can’t perform that action at this time.
0 commit comments