Fix jwt-token
This commit is contained in:
@@ -24,11 +24,15 @@ const io = new Server(server, {
|
||||
}
|
||||
});
|
||||
|
||||
// Rate limiting
|
||||
// Rate limiting (exclude detections endpoint for testing)
|
||||
const limiter = rateLimit({
|
||||
windowMs: parseInt(process.env.RATE_LIMIT_WINDOW_MS) || 15 * 60 * 1000, // 15 minutes
|
||||
max: parseInt(process.env.RATE_LIMIT_MAX_REQUESTS) || 100,
|
||||
message: 'Too many requests from this IP, please try again later.'
|
||||
message: 'Too many requests from this IP, please try again later.',
|
||||
skip: (req) => {
|
||||
// Skip rate limiting for drone detection endpoints during testing
|
||||
return req.path.includes('/detections');
|
||||
}
|
||||
});
|
||||
|
||||
// Middleware
|
||||
|
||||
Reference in New Issue
Block a user