feat: Add rate limiting to public API routes - #251
Conversation
Add missing dark: variants to nav, dashboard, verify, login, routes, and refund-panel components. Fixes gaps in hover states, borders, text colors, and button backgrounds that were inconsistent in dark mode. Closes accensa#121
- Integrate @upstash/ratelimit with Redis-backed sliding window - Apply 100 requests/IP/minute limit to /api/verify, /api/auth, /api/hook/* - Return 429 with Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining headers - Extract client IP from x-forwarded-for / x-real-ip headers - Rate limiting runs in middleware before DB access Closes accensa#131
|
@Aj-Kayvee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@Aj-Kayvee is attempting to deploy a commit to the ACCENSA Team on Vercel. A member of the Team first needs to authorize it. |
|
MergeKeeper review Scope: in scope for linked issue Rate limiting has been successfully added to public API routes using Upstash Redis in the Next.js middleware with correct 429 response handling and headers. Reviewed commit: |
|
MergeKeeper merge status Status: blocked Reason: One or more required CI checks failed. Failing checks:
Next steps:
|
Summary
Integrates with Upstash Redis to rate-limit public-facing API routes before they reach the database layer.
Changes
Design decisions
Required environment variables
UPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKENAcceptance criteria
Closes #131