rate limiting
This commit is contained in:
@@ -39,10 +39,10 @@ app.use(helmet({
|
||||
}
|
||||
}));
|
||||
|
||||
// Rate limiting
|
||||
// Rate limiting - relaxed for development
|
||||
const limiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
max: 100, // Limit each IP to 100 requests per windowMs
|
||||
max: 1000, // Increased to 1000 requests per 15 minutes for development
|
||||
message: 'Too many requests from this IP, please try again later.',
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
@@ -52,7 +52,7 @@ app.use(limiter);
|
||||
// Stricter rate limiting for auth routes
|
||||
const authLimiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
max: 50, // Limit each IP to 50 auth requests per windowMs (increased for development)
|
||||
max: 200, // Increased to 200 auth requests per 15 minutes for development
|
||||
message: 'Too many authentication attempts, please try again later.',
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
|
||||
Reference in New Issue
Block a user