-
Notifications
You must be signed in to change notification settings - Fork 8
Rate limiting middleware #29
Copy link
Copy link
Closed
Labels
backendServer / database / API workServer / database / API workhardinfraCI, hosting, deployment, storageCI, hosting, deployment, storagesecuritySecurity hardeningSecurity hardening
Description
Activity
Metadata
Metadata
Assignees
Labels
backendServer / database / API workServer / database / API workhardinfraCI, hosting, deployment, storageCI, hosting, deployment, storagesecuritySecurity hardeningSecurity hardening
Context
Every write endpoint needs rate limits to prevent abuse. Use Upstash Ratelimit or a simple in-memory + Redis fallback.
Acceptance criteria
lib/ratelimit.tsexports alimit(key, config)helper429withRetry-Afterheader on breachAuditLogwhen a user consistently hits limitsDepends on #1.