refactor: update API rate limit to 600 req/min and improve queue status polling logic

This commit is contained in:
2026-03-01 03:54:01 +01:00
parent 4ad9ffe15d
commit d74092231e
2 changed files with 11 additions and 16 deletions

View File

@@ -31,7 +31,7 @@ const handleBetterAuth: Handle = async ({ event, resolve }) => {
// 200 req/min per IP — high enough for legit use, stops bots/scrapers.
if (event.url.pathname.startsWith('/api/')) {
const ip = event.getClientAddress();
const { ok, retryAfter } = checkRateLimit(`api:${ip}`, 200, 60_000);
const { ok, retryAfter } = checkRateLimit(`api:${ip}`, 600, 60_000);
if (!ok) {
return new Response('Too Many Requests', {
status: 429,