Support SameSite attribute
khalwat opened this issue · comments
Andrew Welch commented
For security reasons, it would be nice to be able to set the SameSite
attribute on a cookie as per:
https://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/
https://sites.google.com/a/chromium.org/dev/Home/chromium-security/ssca
Alex Chao commented
You can write the below code directly:
import { setCookie } from 'tiny-cookie';
setCookie('foo', 'Foo', { SameSite: 'strict' });
I'll update README.md
for SameSite
attribute.
Thank you for reminding me this.