bug cookies Safari

This commit is contained in:
Fred Tempez 2022-04-15 18:17:41 +02:00
parent 524bf1248e
commit f18a568451
1 changed files with 4 additions and 5 deletions

View File

@ -215,8 +215,7 @@ core.start = function() {
// Variables des cookies
var getUrl = window.location;
var domain = "domain=" + getUrl.host + ";";
var path = "path=" + getUrl.pathname.split('/')[1] + ";";
//var path = "path=" + getUrl.pathname.split('/')[1] + ";";
var e = new Date();
e.setFullYear(e.getFullYear() + 1);
var expires = "expires=" + e.toUTCString();
@ -229,14 +228,14 @@ core.start = function() {
if ($("#googleAnalytics").is(":checked")) {
// L'URL du serveur faut TRUE
document.cookie = "ZWII_COOKIE_GA_CONSENT=true;samesite=strict;" + domain + path + expires;
document.cookie = "ZWII_COOKIE_GA_CONSENT=true;samesite=strict;" + domain + expires;
} else {
document.cookie = "ZWII_COOKIE_GA_CONSENT=false;samesite=strict;" + domain + path + expires;
document.cookie = "ZWII_COOKIE_GA_CONSENT=false;samesite=strict;" + domain + expires;
}
}
// Stocke le cookie d'acceptation
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + path + expires;
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + expires;
});