check post csrf3

This commit is contained in:
SBD
2024-01-12 16:11:35 +03:00
parent 9a88243323
commit 4ad3813499
2 changed files with 13 additions and 1 deletions

View File

@@ -157,6 +157,18 @@ function checkStateCookie () {
}
}
function getCsrfCookie () {
let str = window.document.cookie
str = str.split('; ');
let obj_cookie = {}
for (let i = 0;i < str.length;i++){
let cur = str[i].split('=');
obj_cookie[cur[0]] = cur[1]
}
let csrf = obj_cookie['csrftoken']
return csrf
}
function setCokie () {
let date = new Date();
let days = 182;