This commit is contained in:
Jake Kasper
2025-09-02 07:46:06 -05:00
parent 47bfd404a7
commit 08072c4404
2 changed files with 10 additions and 2 deletions

View File

@@ -51,13 +51,14 @@ const limiter = rateLimit({
});
app.use(limiter);
// Stricter rate limiting for auth routes
// Stricter rate limiting for auth routes, but skip low-risk polling endpoint
const authLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 200, // Increased to 200 auth requests per 15 minutes for development
max: 200, // dev-friendly
message: 'Too many authentication attempts, please try again later.',
standardHeaders: true,
legacyHeaders: false,
skip: (req) => (req.path || '') === '/registration-status'
});
// Middleware