mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user