diff --git a/internal/utils/httperror.go b/internal/utils/httperror.go index 9348ba4..7c2127a 100644 --- a/internal/utils/httperror.go +++ b/internal/utils/httperror.go @@ -76,13 +76,7 @@ func CheckIPAccess(ctx *fasthttp.RequestCtx, allowed []net.IPNet) bool { return false } - for _, network := range allowed { - if network.Contains(clientIP) { - return true - } - } - - return false + return IPInAllowList(clientIP, allowed) } // CheckTokenAuth checks token-based authentication.