What
No timeout is set on HTTP requests. Slow clients can hold connections indefinitely and exhaust server resources.
Why
Without request timeouts, a slow or malicious client can tie up Express workers indefinitely, causing denial of service.
Scope
- Add a timeout middleware for all routes
- Configurable timeout via env var
- Return 408 Request Timeout on expiration
- Apply stricter timeout for admin endpoints
Acceptance Criteria
Technical Context
src/index.ts — Express app setup
- New env var:
REQUEST_TIMEOUT_MS (default: 30000)
- New env var:
ADMIN_REQUEST_TIMEOUT_MS (default: 60000)
What
No timeout is set on HTTP requests. Slow clients can hold connections indefinitely and exhaust server resources.
Why
Without request timeouts, a slow or malicious client can tie up Express workers indefinitely, causing denial of service.
Scope
Acceptance Criteria
REQUEST_TIMEOUT_MSenv var (default: 30000)Technical Context
src/index.ts— Express app setupREQUEST_TIMEOUT_MS(default: 30000)ADMIN_REQUEST_TIMEOUT_MS(default: 60000)