NET-163: Return 403 instead of 401 (#2326)

* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version
This commit is contained in:
Tobias Cudnik
2023-05-25 15:40:39 +02:00
committed by GitHub
parent 7b5bef7b3f
commit 3a4363c890
4 changed files with 13 additions and 9 deletions

View File

@@ -157,7 +157,7 @@ func authenticate(response http.ResponseWriter, request *http.Request) {
func authorize(hostAllowed, networkCheck bool, authNetwork string, next http.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var errorResponse = models.ErrorResponse{
Code: http.StatusUnauthorized, Message: logic.Unauthorized_Msg,
Code: http.StatusForbidden, Message: logic.Forbidden_Msg,
}
var params = mux.Vars(r)