feat(search): implement search API with rate limiting and results fetching

This commit is contained in:
Yusuf İpek
2026-03-01 19:18:32 +03:00
parent 75535e8cda
commit 490e800e69
5 changed files with 500 additions and 3 deletions
+3
View File
@@ -42,6 +42,9 @@ export const RATE_LIMIT_CONFIGS: Record<string, RateLimitConfig> = {
'asset-download': { windowMs: 60 * 1000, maxRequests: 10 }, // 10 per minute
'asset-bunny-init': { windowMs: 60 * 1000, maxRequests: 10 }, // 10 per minute
// Search — debounced on client but protect against scripted callers
'search': { windowMs: 60 * 1000, maxRequests: 60 }, // 60 per minute
// Watch progress — allow frequent updates but prevent abuse
'watch-progress': { windowMs: 60 * 1000, maxRequests: 30 }, // 30 per minute (pausing + periodic + visibility changes)