From bb60b1153620dea4c31543ecea5f10a4994da23e Mon Sep 17 00:00:00 2001 From: Jackson Chen <90215880+Sma1lboy@users.noreply.github.com> Date: Tue, 25 Feb 2025 23:54:14 -0600 Subject: [PATCH] feat(rate_limit): increase user request limit from 60 to 120 per minute (#3903) --- ee/tabby-webserver/src/rate_limit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/tabby-webserver/src/rate_limit.rs b/ee/tabby-webserver/src/rate_limit.rs index 7c103145d8fc..2af3cfe84ef0 100644 --- a/ee/tabby-webserver/src/rate_limit.rs +++ b/ee/tabby-webserver/src/rate_limit.rs @@ -8,12 +8,12 @@ pub struct UserRateLimiter { rate_limiters: Mutex>, } -static USER_REQUEST_LIMIT_PER_MINUTE: u64 = 60; +static USER_REQUEST_LIMIT_PER_MINUTE: u64 = 120; impl Default for UserRateLimiter { fn default() -> Self { Self { - // User rate limiter is hardcoded to 30 requests per minute, thus the timespan is 60 seconds. + // User rate limiter is hardcoded to 120 requests per minute, thus the timespan is 60 seconds. rate_limiters: Mutex::new(TimedCache::with_lifespan(60)), } }