feat(video-download): add Bunny original/compressed download options with secure file handling and tighter rate limits

This commit is contained in:
Yusuf İpek
2026-02-22 16:33:52 +03:00
parent f224b0a8a1
commit 0288fe08d3
4 changed files with 422 additions and 74 deletions
+4
View File
@@ -29,6 +29,10 @@ export const RATE_LIMIT_CONFIGS: Record<string, RateLimitConfig> = {
// Watch progress — allow frequent updates but prevent abuse
'watch-progress': { windowMs: 60 * 1000, maxRequests: 30 }, // 30 per minute (pausing + periodic + visibility changes)
// Downloads — strict enough to limit upstream probing/cost abuse
'video-download': { windowMs: 60 * 1000, maxRequests: 8 }, // 8 per minute
'video-download-prepare': { windowMs: 60 * 1000, maxRequests: 5 }, // 5 per minute
// Member management
'invite-member': { windowMs: 60 * 60 * 1000, maxRequests: 30 }, // 30 per hour
'manage-member': { windowMs: 60 * 1000, maxRequests: 20 }, // 20 per minute