From 8bba5f6137d7c47383fc58a5f701b46ab2c33b0d Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 25 Nov 2024 16:15:07 +0100 Subject: [PATCH] fix: tweak rate limits as just browsing is triggering them --- rate/rate_limiter.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rate/rate_limiter.go b/rate/rate_limiter.go index 28368e2..d223197 100644 --- a/rate/rate_limiter.go +++ b/rate/rate_limiter.go @@ -134,12 +134,12 @@ func (l *Limiter) bucketLimiter(user, method, bucket string) *httprate.RateLimit func requestLimitFor(method string) (int, time.Duration) { switch strings.ToUpper(method) { case "PATCH", "POST": - return 1, time.Second - case "DELETE": - return 1, 5 * time.Second - case "GET": return 3, time.Second + case "DELETE": + return 2, 5 * time.Second + case "GET": + return 10, time.Second default: - return 2, time.Second + return 5, time.Second } }