mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 02:14:13 -05:00
add secure when using samesite=none
This commit is contained in:
@@ -6,10 +6,12 @@ function setCookie(name,value,days) {
|
||||
expires = "; Expires=" + date.toUTCString();
|
||||
}
|
||||
var domain = "";
|
||||
var samesite = "";
|
||||
if (window.location.host == "fontes.dev.br") {
|
||||
domain = "; Domain=fontes.dev.br"
|
||||
domain = "; Domain=fontes.dev.br";
|
||||
samesite = "; SameSite=None; Secure";
|
||||
}
|
||||
document.cookie = name + "=" + (value || "") + expires + "; SameSite=None; Path=/" + domain;
|
||||
document.cookie = name + "=" + (value || "") + expires + "; Path=/" + samesite + domain;
|
||||
}
|
||||
function getCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
|
||||
Reference in New Issue
Block a user