diff --git a/internal/acl/config.go b/internal/acl/config.go index 244bc451..f54b50be 100644 --- a/internal/acl/config.go +++ b/internal/acl/config.go @@ -292,16 +292,16 @@ func (c *Config) IPAllowed(ip net.IP) bool { } ipAndStr := &maxmind.IPInfo{IP: ip, Str: ipStr} - if c.Allow.Match(ipAndStr) { - c.logAndNotify(ipAndStr, true) - c.cacheRecord(ipAndStr, true) - return true - } if c.Deny.Match(ipAndStr) { c.logAndNotify(ipAndStr, false) c.cacheRecord(ipAndStr, false) return false } + if c.Allow.Match(ipAndStr) { + c.logAndNotify(ipAndStr, true) + c.cacheRecord(ipAndStr, true) + return true + } c.logAndNotify(ipAndStr, c.defaultAllow) c.cacheRecord(ipAndStr, c.defaultAllow)