mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 10:16:14 +00:00
fix: update SameSite attribute in setCookie function to Strict
This commit is contained in:
parent
8d1a0660cb
commit
22cd54c4f0
@ -297,7 +297,7 @@ export const isBeta = import.meta.env.MODE === "beta"; // this checks to see if
|
|||||||
export function setCookie(cName: string, cValue: string): void {
|
export function setCookie(cName: string, cValue: string): void {
|
||||||
const expiration = new Date();
|
const expiration = new Date();
|
||||||
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
|
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
|
||||||
document.cookie = `${cName}=${cValue};Secure;SameSite=None;Path=/;Expires=${expiration.toUTCString()}`;
|
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Path=/;Expires=${expiration.toUTCString()}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCookie(cName: string): string {
|
export function getCookie(cName: string): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user