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