Skip to content

Commit 3915e55

Browse files
Update deprecated property for express-rate-limit (#900)
Co-authored-by: Kent C. Dodds <me@kentcdodds.com>
1 parent 81703ee commit 3915e55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const maxMultiple =
144144
!IS_PROD || process.env.PLAYWRIGHT_TEST_BASE_URL ? 10_000 : 1
145145
const rateLimitDefault = {
146146
windowMs: 60 * 1000,
147-
max: 1000 * maxMultiple,
147+
limit: 1000 * maxMultiple,
148148
standardHeaders: true,
149149
legacyHeaders: false,
150150
validate: { trustProxy: false },
@@ -160,13 +160,13 @@ const rateLimitDefault = {
160160
const strongestRateLimit = rateLimit({
161161
...rateLimitDefault,
162162
windowMs: 60 * 1000,
163-
max: 10 * maxMultiple,
163+
limit: 10 * maxMultiple,
164164
})
165165

166166
const strongRateLimit = rateLimit({
167167
...rateLimitDefault,
168168
windowMs: 60 * 1000,
169-
max: 100 * maxMultiple,
169+
limit: 100 * maxMultiple,
170170
})
171171

172172
const generalRateLimit = rateLimit(rateLimitDefault)

0 commit comments

Comments
 (0)