mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 19:38:07 +00:00
fix: 修复登录符合拒绝时 登录日志类型异常问题 (#8758)
Co-authored-by: feng626 <1304903146@qq.com>
This commit is contained in:
@@ -98,7 +98,10 @@ function doRequestAuth() {
|
|||||||
},
|
},
|
||||||
error: function (text, data) {
|
error: function (text, data) {
|
||||||
},
|
},
|
||||||
flash_message: false
|
beforeSend: function(request) {
|
||||||
|
request.setRequestHeader("X-JMS-LOGIN-TYPE", "W");
|
||||||
|
},
|
||||||
|
flash_message: false, // 是否显示flash消息
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function initClipboard() {
|
function initClipboard() {
|
||||||
|
@@ -270,11 +270,13 @@ function requestApi(props) {
|
|||||||
if (typeof(dataBody) === "object") {
|
if (typeof(dataBody) === "object") {
|
||||||
dataBody = JSON.stringify(dataBody)
|
dataBody = JSON.stringify(dataBody)
|
||||||
}
|
}
|
||||||
|
var beforeSend = props.beforeSend || function (request) {}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: props.url,
|
url: props.url,
|
||||||
type: props.method || "PATCH",
|
type: props.method || "PATCH",
|
||||||
data: dataBody,
|
data: dataBody,
|
||||||
|
beforeSend: beforeSend,
|
||||||
contentType: props.content_type || "application/json; charset=utf-8",
|
contentType: props.content_type || "application/json; charset=utf-8",
|
||||||
dataType: props.data_type || "json"
|
dataType: props.data_type || "json"
|
||||||
}).done(function (data, textStatue, jqXHR) {
|
}).done(function (data, textStatue, jqXHR) {
|
||||||
|
Reference in New Issue
Block a user