diff --git a/api/src/main.rs b/api/src/main.rs index 7266f24..da3e2c3 100644 --- a/api/src/main.rs +++ b/api/src/main.rs @@ -61,9 +61,14 @@ async fn main() { ); // Rate limiting configuration (using tower_governor) - // From the docs: Allows bursts with up to eight requests and replenishes + // From the docs: Allows bursts with up to 20 requests and replenishes // one element after 500ms, based on peer IP. - let governor_config = Box::new(GovernorConfigBuilder::default().finish().unwrap()); + let governor_config = Box::new( + GovernorConfigBuilder::default() + .burst_size(20) + .finish() + .unwrap(), + ); let rate_limit = ServiceBuilder::new() // Handle errors from governor and convert into HTTP responses .layer(HandleErrorLayer::new(|e: BoxError| async move {