1.0.2 • Published 4 years ago
@kamataryo/sandbox-same-site-cookies v1.0.2
@kamataryo/sandbox-same-site-cookies
This is an instant server to try SameSite=Strict|Lax|None
cookies.
CAUTION This program requires privilege to run. Be aware what you are doing and execute with on your lisk.
usage
You can try with:
$ sudo npx @kamataryo/sandbox-same-site-cookies
# or
$ git clone git@github.com:kamataryo/sandbox-same-site-cookies.git
$ cd sandbox-same-site-cookies
$ sudo npm start
Then open http://strict.test.
Q&A
- Q: Why is
sudo
required? A: This command edit the
/etc/hosts
to use multiple local domains. See bin.sh for details.Q: How can I try
SameSite
?- A:
- login at http://strict.test/login first
- Move to http://stirict.test with
GET
and you will see a login header - Move to http://none.test with
GET
- Move to http://strict.test with
GET
again and you will miss the login header, i.e. the cookie is not used - login at http://lax.test/login next
- Move to http://lax.test with
GET
and you will see the login header - Move to http://none.test with
GET
- Move to http://lax.test with
GET
again and you will see the login header again, i.e. the cookie is used - However, if you use
POST
to move, you will miss the login header, i.e. the cookie is not used