mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:31:11 -05:00
Centralize rate limiting config
Create shared rateLimitConfig.ts with tiers (strict, moderate, lenient, generous, per-user variants) and update edge functions to import centralized rate limiters. Replace inline rate limiter usage with new config, preserving backward compatibility. Add documentation guide for rate limiting usage.
This commit is contained in:
@@ -514,5 +514,5 @@ const handler = async (req: Request) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Apply rate limiting: 10 requests per minute per IP (standard tier)
|
||||
serve(withRateLimit(handler, rateLimiters.standard, corsHeaders));
|
||||
// Apply rate limiting: 10 requests per minute per IP (moderate tier for moderation actions)
|
||||
serve(withRateLimit(handler, rateLimiters.moderate, corsHeaders));
|
||||
|
||||
Reference in New Issue
Block a user