Set cookies with samesite=lax attribute

This commit is contained in:
Bartek Fabiszewski 2020-05-15 21:24:24 +02:00
parent 2208d3621d
commit e3e524f406

View File

@ -32,7 +32,7 @@ export default class uUtils {
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = `; expires=${date.toUTCString()}`; expires = `; expires=${date.toUTCString()}`;
} }
document.cookie = `ulogger_${name}=${value}${expires}; path=/`; document.cookie = `ulogger_${name}=${value}${expires}; path=/; samesite=lax`;
} }
/** /**