Context
Public authentication, support, payout, application, and upload endpoints can be targeted by automated abuse. A production platform needs controls that work across serverless instances and distinguish anonymous, authenticated, and resource-level limits.
Scope
- Create a distributed rate-limit abstraction with route-specific policies.
- Key limits safely by authenticated actor, IP/network signal, and high-value resource where appropriate.
- Add payload size limits, timeouts, and bounded pagination before expensive parsing/database work.
- Define stricter policies for login/reset, uploads, application creation, and state transitions.
- Return standard
429 responses with retry metadata.
- Add metrics and alerting without storing raw sensitive identifiers.
Acceptance criteria
Relevant areas
src/app/api/**, middleware, auth flows, file routes, pagination endpoints.
Note
Keep implementation and review focused on defensive controls; do not include live credentials or exploit payloads in PRs.
Context
Public authentication, support, payout, application, and upload endpoints can be targeted by automated abuse. A production platform needs controls that work across serverless instances and distinguish anonymous, authenticated, and resource-level limits.
Scope
429responses with retry metadata.Acceptance criteria
Relevant areas
src/app/api/**, middleware, auth flows, file routes, pagination endpoints.Note
Keep implementation and review focused on defensive controls; do not include live credentials or exploit payloads in PRs.