dynamise publisher domain in cookie-consent mechanism

This commit is contained in:
Set Hallstrom 2020-11-24 19:42:39 +01:00
parent 33ffadfc64
commit 0e60afb224

View file

@ -19,7 +19,7 @@
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 = name + "=" + value + "; domain=.basspistol.com" + expires + "; path=/;SameSite=Strict"; document.cookie = name + "=" + value + "; domain=.{{ site.publisher.domain }}" + expires + "; path=/;SameSite=Strict";
} }
function readCookie(name) { function readCookie(name) {
var nameEQ = name + "="; var nameEQ = name + "=";