mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-27 05:08:11 +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:
@@ -56,7 +56,7 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
|
||||
func allowUsers(next http.Handler) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var errorResponse = models.ErrorResponse{
|
||||
Code: http.StatusInternalServerError, Message: logic.Unauthorized_Msg,
|
||||
Code: http.StatusInternalServerError, Message: logic.Forbidden_Msg,
|
||||
}
|
||||
bearerToken := r.Header.Get("Authorization")
|
||||
var tokenSplit = strings.Split(bearerToken, " ")
|
||||
|
Reference in New Issue
Block a user