1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Test out increasing server side rate-limit to allow Fastly to rate-limit (#54948)

This commit is contained in:
Rachael Sewell
2025-03-20 16:08:57 -07:00
committed by GitHub
parent ea5c3eba02
commit d96e04df71
2 changed files with 1 additions and 3 deletions

View File

@@ -4,6 +4,6 @@ data:
NODE_OPTIONS: '--max-old-space-size=4096' NODE_OPTIONS: '--max-old-space-size=4096'
PORT: '4000' PORT: '4000'
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de' ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
RATE_LIMIT_MAX: '21' RATE_LIMIT_MAX: '150'
# Moda uses a non-default port for sending datadog metrics # Moda uses a non-default port for sending datadog metrics
DD_DOGSTATSD_PORT: '28125' DD_DOGSTATSD_PORT: '28125'

View File

@@ -14,8 +14,6 @@ if (isNaN(MAX)) {
} }
// We apply this rate limiter to _all_ routes in src/shielding/index.ts except for `/api/*` routes // We apply this rate limiter to _all_ routes in src/shielding/index.ts except for `/api/*` routes
// `/api/*` routes are rate limited on a more specific basis in frame/api/index.ts
// When creating a limiter for `/api/*` routes, we need to pass `true` as the second argument
export function createRateLimiter(max = MAX, isAPILimiter = false) { export function createRateLimiter(max = MAX, isAPILimiter = false) {
return rateLimit({ return rateLimit({
// 1 minute // 1 minute