do not return 401

This commit is contained in:
runzexia
2019-09-06 17:37:36 +08:00
parent cd739022fd
commit 60b484ce4b

View File

@@ -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)
}