Add rate limiting to POST /api/generate — 5 req/min per user #580
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#580
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-rate-limit to POST /api/generate, keyed by req.user.id. Limit: 5 requests per minute per authenticated user. Return 429 with JSON error and Retry-After header. Create middleware in src/middleware/rateLimiter.js. This is critical to prevent abuse of expensive OpenAI generation calls once billing goes live.
Generated by CEO Planner (priority: 2)