refactor: improvement of access policy middleware
This commit is contained in:
@@ -49,6 +49,10 @@ func (access AccessPolicy) AccessPolicyMiddleware(next http.Handler) http.Handle
|
|||||||
RespondWithError(w, http.StatusForbidden, http.StatusText(http.StatusForbidden))
|
RespondWithError(w, http.StatusForbidden, http.StatusText(http.StatusForbidden))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if index == len(access.SourceRanges)-1 {
|
||||||
|
next.ServeHTTP(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
// Handle single IP
|
// Handle single IP
|
||||||
|
|||||||
Reference in New Issue
Block a user