refactor: improvement of access policy middleware

This commit is contained in:
2024-12-09 18:13:24 +01:00
parent af2b0cbce1
commit 36fb317367

View File

@@ -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