mirror of https://github.com/jumpserver/jumpserver
fix: 修复ajax请求携带csrftoken问题
parent
516cb05d69
commit
be2708f83d
|
@ -125,8 +125,9 @@ function csrfSafeMethod(method) {
|
|||
}
|
||||
|
||||
function setAjaxCSRFToken() {
|
||||
var csrftoken = getCookie('csrftoken');
|
||||
var sessionid = getCookie('sessionid');
|
||||
const prefix = getCookie('SESSION_COOKIE_NAME_PREFIX', '')
|
||||
var csrftoken = getCookie(`${prefix}csrftoken`);
|
||||
var sessionid = getCookie(`${prefix}sessionid`);
|
||||
|
||||
$.ajaxSetup({
|
||||
beforeSend: function (xhr, settings) {
|
||||
|
|
Loading…
Reference in New Issue