Use secure cookies

This commit is contained in:
Pancakes 2024-06-08 21:03:33 -04:00
parent 60a3edb918
commit ae02943b16
No known key found for this signature in database
GPG Key ID: 5792877BFA27DC8F

View File

@ -296,7 +296,7 @@ export let isLocalServerConnected = true;
export function setCookie(cName: string, cValue: string): void {
const expiration = new Date();
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
document.cookie = `${cName}=${cValue};SameSite=Strict;path=/;expires=${expiration.toUTCString()}`;
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Path=/;Expires=${expiration.toUTCString()}`;
}
export function getCookie(cName: string): string {