fix: reduce rate limit to 5s, add 10s connection timeout
All checks were successful
Build & Push / build-and-push (push) Successful in 1m56s

- Rate limit reduced from 30s to 5s for testing
- WebSocket setup times out after 10s instead of hanging forever
- Added connection logging

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 14:19:57 +01:00
parent 0e3c92f873
commit bbf534cf4f
2 changed files with 14 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import { generateEphemeralToken } from '@/lib/gemini-live';
// ─── Rate Limiting ────────────────────────────────────────────────────────────
const rateLimitMap = new Map<string, number>();
const RATE_LIMIT_MS = 30_000; // 1 token per 30 seconds per IP
const RATE_LIMIT_MS = 5_000; // 1 token per 5 seconds per IP
// ─── Health Check (GET — no rate limit) ──────────────────────────────────────