Skip to content

Commit d96e04d

Browse files
authored
Test out increasing server side rate-limit to allow Fastly to rate-limit (#54948)
1 parent ea5c3eb commit d96e04d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

config/moda/configuration/default/env.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ data:
44
NODE_OPTIONS: '--max-old-space-size=4096'
55
PORT: '4000'
66
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
7-
RATE_LIMIT_MAX: '21'
7+
RATE_LIMIT_MAX: '150'
88
# Moda uses a non-default port for sending datadog metrics
99
DD_DOGSTATSD_PORT: '28125'

src/shielding/middleware/rate-limit.ts

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ if (isNaN(MAX)) {
1414
}
1515

1616
// We apply this rate limiter to _all_ routes in src/shielding/index.ts except for `/api/*` routes
17-
// `/api/*` routes are rate limited on a more specific basis in frame/api/index.ts
18-
// When creating a limiter for `/api/*` routes, we need to pass `true` as the second argument
1917
export function createRateLimiter(max = MAX, isAPILimiter = false) {
2018
return rateLimit({
2119
// 1 minute

0 commit comments

Comments
 (0)