Protect your SaaS application from threats and vulnerabilities
UPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN
.env
file:
lib/ratelimit.ts
with sensible defaults:
lib/ratelimit.ts
.
X-RateLimit-Limit
: The maximum number of requests allowedX-RateLimit-Remaining
: The number of requests remainingX-RateLimit-Reset
: The time when the rate limit resetsUPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN
lib/ratelimit.ts
based on your traffic patterns: