Fix jwt-token
This commit is contained in:
4
.env
4
.env
@@ -36,6 +36,10 @@ LOG_ALL_DETECTIONS=true
|
||||
API_DEBUG=true
|
||||
STORE_RAW_PAYLOAD=true
|
||||
|
||||
# Rate Limiting Configuration
|
||||
RATE_LIMIT_WINDOW_MS=900000
|
||||
RATE_LIMIT_MAX_REQUESTS=1000
|
||||
|
||||
# Health Probe Simulator Configuration
|
||||
PROBE_FAILRATE=30
|
||||
PROBE_INTERVAL_SECONDS=60
|
||||
|
||||
@@ -69,6 +69,8 @@ services:
|
||||
STORE_DRONE_TYPE0: ${STORE_DRONE_TYPE0:-false}
|
||||
LOG_ALL_DETECTIONS: ${LOG_ALL_DETECTIONS:-false}
|
||||
STORE_RAW_PAYLOAD: ${STORE_RAW_PAYLOAD:-false}
|
||||
RATE_LIMIT_WINDOW_MS: ${RATE_LIMIT_WINDOW_MS:-900000}
|
||||
RATE_LIMIT_MAX_REQUESTS: ${RATE_LIMIT_MAX_REQUESTS:-1000}
|
||||
ports:
|
||||
- "3002:3001"
|
||||
volumes:
|
||||
|
||||
@@ -34,7 +34,7 @@ const io = new Server(server, {
|
||||
// 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,
|
||||
max: parseInt(process.env.RATE_LIMIT_MAX_REQUESTS) || 1000, // Increased from 100 to 1000
|
||||
message: 'Too many requests from this IP, please try again later.',
|
||||
skip: (req) => {
|
||||
// Skip rate limiting for drone detection endpoints during testing
|
||||
|
||||
Reference in New Issue
Block a user