Test out increasing server side rate-limit to allow Fastly to rate-limit (#54948)
This commit is contained in:
@@ -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'
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user