fix: tweak rate limits as just browsing is triggering them

This commit is contained in:
sam 2024-11-25 16:15:07 +01:00
parent 261435c252
commit 8bba5f6137
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

@ -134,12 +134,12 @@ func (l *Limiter) bucketLimiter(user, method, bucket string) *httprate.RateLimit
func requestLimitFor(method string) (int, time.Duration) { func requestLimitFor(method string) (int, time.Duration) {
switch strings.ToUpper(method) { switch strings.ToUpper(method) {
case "PATCH", "POST": case "PATCH", "POST":
return 1, time.Second
case "DELETE":
return 1, 5 * time.Second
case "GET":
return 3, time.Second return 3, time.Second
case "DELETE":
return 2, 5 * time.Second
case "GET":
return 10, time.Second
default: default:
return 2, time.Second return 5, time.Second
} }
} }