set prefence cookie for domain and subdomain

This commit is contained in:
Set Hallstrom 2020-11-24 19:24:39 +01:00
parent 2a80408cd5
commit 19be21f3bd

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