check post csrf3
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user