fix traffic limiter for CIDR
This commit is contained in:
1 parent
2b9ea187b8
commit
84079e32d2
3 files changed
+59
-41
No files matched your search
@@ -231,7 +231,7 @@ func (l *rateLimiter) reload(ctx context.Context) error {
|
||||
ipLimits[key] = NewRateLimitGenerator(limit)
|
||||
default:
|
||||
if ip := net.ParseIP(key); ip != nil {
|
||||
ipLimits[key] = NewRateLimitGenerator(limit)
|
||||
ipLimits[key] = NewRateLimitSingleGenerator(limit)
|
||||
break
|
||||
}
|
||||
if _, ipNet, _ := net.ParseCIDR(key); ipNet != nil {
|
||||
|
||||
Reference in new issue
Block a user