Increase API rate limit to 200 req/min (Turnstile errors were exhausting 60/min limit)

This commit is contained in:
Daniel 2026-04-11 04:47:08 +02:00
parent 04030b1ded
commit d29f55f8a6

View file

@ -77,9 +77,9 @@ app.use(express.json({ limit: '10mb' }));
// ============================================================ // ============================================================
// RATE LIMITING // RATE LIMITING
// ============================================================ // ============================================================
// General API: 60 req/min // General API: 200 req/min (increased — app makes many calls on login)
app.use('/api/', rateLimit({ app.use('/api/', rateLimit({
windowMs: 60000, max: 60, windowMs: 60000, max: 200,
message: { error: 'Too many requests' }, message: { error: 'Too many requests' },
standardHeaders: true, legacyHeaders: false standardHeaders: true, legacyHeaders: false
})); }));