samesite policy for cookie

This commit is contained in:
sakrecoer 2020-08-10 13:55:23 +02:00
parent c973bfc880
commit 136b174ec9

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