fix: RateLimit | increase rate limits for public usage

This commit is contained in:
2025-12-01 18:44:29 +05:00
parent 69bdd52df6
commit 8dc22ff13b

View File

@@ -7,8 +7,8 @@ type RateLimitMiddlewareOptions = {
namespace: string; namespace: string;
name: string; name: string;
average?: number; // default 10 average?: number; // default 60
burst?: number; // default 50 burst?: number; // default 120
period?: string; // default "1s" period?: string; // default "1s"
}; };
@@ -18,8 +18,8 @@ export class RateLimitMiddleware extends Construct {
constructor(scope: Construct, id: string, opts: RateLimitMiddlewareOptions) { constructor(scope: Construct, id: string, opts: RateLimitMiddlewareOptions) {
super(scope, id); super(scope, id);
const average = opts.average ?? 10; const average = opts.average ?? 60;
const burst = opts.burst ?? 50; const burst = opts.burst ?? 120;
const period = opts.period ?? "1s"; const period = opts.period ?? "1s";
this.ref = `${opts.namespace}/${opts.name}`; this.ref = `${opts.namespace}/${opts.name}`;