diff --git a/pkg/apiserver/devops/devops.go b/pkg/apiserver/devops/devops.go index e4b892ee92d644327428d43a9a3a02881a5cc98c..aab712342d2b889212e4c6da3385fcb6bccacd60 100644 --- a/pkg/apiserver/devops/devops.go +++ b/pkg/apiserver/devops/devops.go @@ -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) }