Skip to content

Commit 071f245

Browse files
authored
Increase default MaxConnectionsPerIP to 500 (#230)
1 parent e9c8aa8 commit 071f245

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/ratelimit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func DefaultRateLimitConfig() RateLimitConfig {
2626
MaxFailedAttempts: 5,
2727
FailedAttemptWindow: 5 * time.Minute,
2828
BanDuration: 15 * time.Minute,
29-
MaxConnectionsPerIP: 100,
29+
MaxConnectionsPerIP: 500,
3030
MaxConnections: 1024,
3131
}
3232
}

server/ratelimit_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ func TestDefaultRateLimitConfig(t *testing.T) {
369369
if cfg.BanDuration != 15*time.Minute {
370370
t.Errorf("BanDuration = %v, want 15m", cfg.BanDuration)
371371
}
372-
if cfg.MaxConnectionsPerIP != 100 {
373-
t.Errorf("MaxConnectionsPerIP = %d, want 100", cfg.MaxConnectionsPerIP)
372+
if cfg.MaxConnectionsPerIP != 500 {
373+
t.Errorf("MaxConnectionsPerIP = %d, want 500", cfg.MaxConnectionsPerIP)
374374
}
375375
if cfg.MaxConnections != 1024 {
376376
t.Errorf("MaxConnections = %d, want 1024", cfg.MaxConnections)

0 commit comments

Comments
 (0)