bunny.ts: generateSignedUrl now returns folxvideos CDN URL

This commit is contained in:
Sebastjan 2026-06-07 15:26:29 +02:00
parent b3e23877cf
commit 26de8896c5

View File

@ -254,12 +254,7 @@ export class BunnyService {
// Generate signed URL for private video access
generateSignedUrl(videoId: string, expirationTime: number = 3600): string {
const baseUrl = `https://${this.hostname}/${videoId}/playlist.m3u8`;
const expires = Math.floor(Date.now() / 1000) + expirationTime;
// Simple token generation (in production, use proper HMAC signing)
const token = Buffer.from(`${videoId}:${expires}:${this.apiKey.substring(0, 8)}`).toString('base64');
return `${baseUrl}?token=${token}&expires=${expires}`;
// Switched to folxvideos.b-cdn.net (S3-folxspeed origin) - public, no token required
return `https://folxvideos.b-cdn.net/folx-tv/${videoId}/master.m3u8`;
}
}