Add 30-second request timeout middleware to all API routes #1533
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1533
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add Express middleware that sets a 30-second timeout on all incoming HTTP requests. Use
req.setTimeout(30000)and attach a handler that responds with 504 Gateway Timeout if the route handler hasn't responded within 30 seconds. Apply this middleware globally before route definitions. Exclude the /health endpoint from timeout (it should respond in <1s anyway, but don't risk false positives). Add a test: a route that deliberately delays 31s returns 504.Generated by CEO Planner (priority: 3)