未验证 提交 4e4664ef 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #708 from runzexia/change-status-code

api do not return 401
......@@ -177,6 +177,9 @@ func Validate(req *restful.Request, resp *restful.Response) {
}
resp.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
if resp.StatusCode() == http.StatusUnauthorized {
resp.WriteHeader(http.StatusPreconditionRequired)
}
resp.Write(res)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册