Explicitly add SameSite attribute to cookies
This commit is contained in:
parent
63e9ed6e3d
commit
b4fca1b46e
@ -3,8 +3,10 @@ export const storeCookie = (
|
||||
value: string,
|
||||
path= '/',
|
||||
maxAge = 63158400,
|
||||
sameSite = 'Lax',
|
||||
) => {
|
||||
document.cookie = `${name}=${value};Path=${path};Max-Age=${maxAge}`;
|
||||
document.cookie =
|
||||
`${name}=${value};Path=${path};Max-Age=${maxAge};SameSite=${sameSite}`;
|
||||
};
|
||||
|
||||
export const getCookie = (name: string) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user