Cookie の SameSite の挙動を確認するための Chrome のコマンドライン引数
chrome://flags で設定しても確かめられるけど、それだと Chrome の完全再起動が必要だし、とりあえず Canary で一時的にサクッと確認したーい!っていう自分のためのコマンド。
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure,SameSiteDefaultChecksMethodRigorously
それぞれの効果はというと
- SameSiteByDefaultCookies
- CookiesWithoutSameSiteMustBeSecure
- chrome://flags/#cookies-without-same-site-must-be-secure と同じ。
- If enabled, cookies without SameSite restrictions must also be Secure. If a cookie without SameSite restrictions is set without the Secure attribute, it will be rejected. This flag only has an effect if "SameSite by default cookies" is also enabled.
- Chrome Platform Status によれば SameSite=None なのに Secure 属性がない cookie は無視しますよ、というもの。
- 素直に訳すと、 SameSite 属性も Secure 属性も無い cookie は無視しますよ、と読めるけど、きっと何かの間違い。
- SameSiteDefaultChecksMethodRigorously
参考資料: