allow signin on local using non-production SameSite=Lax

This commit is contained in:
jessop 2020-07-24 15:28:09 -04:00 committed by Sean Yesmunt
parent e661beabdc
commit 5399c1941c

View file

@ -17,7 +17,13 @@ function setCookie(name, value, expirationDaysOnWeb) {
expires = `expires=${IS_WEB ? date.toUTCString() : maxExpiration};`;
}
let cookie = `${name}=${value || ''}; ${expires} path=/; SameSite=None;`;
let cookie = `${name}=${value || ''}; ${expires} path=/;`;
if (isProduction) {
cookie += ` SameSite=None;`;
}
if (!isProduction) {
cookie += ` SameSite=Lax;`;
}
if (isProduction) {
cookie += ` domain=${domain}; Secure;`;
}