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); app.use(limiter);
// Stricter rate limiting for auth routes // Stricter rate limiting for auth routes, but skip low-risk polling endpoint
const authLimiter = rateLimit({ const authLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes 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.', message: 'Too many authentication attempts, please try again later.',
standardHeaders: true, standardHeaders: true,
legacyHeaders: false, legacyHeaders: false,
skip: (req) => (req.path || '') === '/registration-status'
}); });
// Middleware // Middleware

View File

@@ -13,6 +13,13 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
environment: environment:
- REACT_APP_API_URL=https://turftracker.kaspers.us/api - REACT_APP_API_URL=https://turftracker.kaspers.us/api
# Stabilize CRA dev server behind Traefik (WebSocket + polling)
- WDS_SOCKET_HOST=turftracker.kaspers.us
- WDS_SOCKET_PORT=443
- WDS_SOCKET_PATH=/ws
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- WATCHPACK_POLLING_INTERVAL=1000
volumes: volumes:
- ./frontend:/app - ./frontend:/app
- /app/node_modules - /app/node_modules