forked from ZwiiCMS-Team/ZwiiCMS
Spécification du domaine et du chemin dans le cookie
This commit is contained in:
parent
7f113a6d82
commit
bc070c05d7
@ -239,7 +239,8 @@ core.start = function() {
|
||||
var expires = new Date();
|
||||
expires.setFullYear(expires.getFullYear() + 1);
|
||||
expires = "expires=" + expires.toUTCString();
|
||||
document.cookie = "ZWII_COOKIE_CONSENT=true;path:/;samesite=lax;" + expires;
|
||||
var getUrl = window.location;
|
||||
document.cookie = "ZWII_COOKIE_CONSENT=true;domain=" + getUrl.host + ";path=" + getUrl.pathname.split('/')[1] + ";samesite=strict;" + expires;
|
||||
// Ferme le message
|
||||
$(this).parents("#cookieConsent").fadeOut();
|
||||
}),
|
||||
@ -251,7 +252,8 @@ core.start = function() {
|
||||
var expires = new Date();
|
||||
expires.setFullYear(expires.getFullYear() + 1);
|
||||
expires = "expires=" + expires.toUTCString();
|
||||
document.cookie = "ZWII_COOKIE_CONSENT=false;path:/;samesite=lax;" + expires;
|
||||
var getUrl = window.location;
|
||||
document.cookie = "ZWII_COOKIE_CONSENT=true;domain=" + getUrl.host + ";path=" + getUrl.pathname.split('/')[1] + ";samesite=strict;" + expires;
|
||||
// Ferme le message
|
||||
$(this).parents("#cookieConsent").fadeOut();
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user