mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
changed cookie sameSite to lax
This commit is contained in:
parent
4324846ebf
commit
702663fd56
@ -65,7 +65,7 @@ export function setCookie(name: string, value: string, options: SetCookieOptions
|
||||
Cookies.set(name, value, {
|
||||
secure: window.location.protocol === "https:",
|
||||
expires: options.maxAge === undefined ? undefined : new Date(Date.now() + (options.maxAge) * 1000),
|
||||
sameSite: "Strict"
|
||||
sameSite: 'lax',
|
||||
});
|
||||
} else {
|
||||
let isSecureCookie = !!rscCookies().get("stack-is-https");
|
||||
@ -76,6 +76,7 @@ export function setCookie(name: string, value: string, options: SetCookieOptions
|
||||
rscCookies().set(name, value, {
|
||||
secure: isSecureCookie,
|
||||
maxAge: options.maxAge,
|
||||
sameSite: 'lax',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user