18 lines
502 B
TypeScript
18 lines
502 B
TypeScript
export async function GET(request: Request) {
|
|
const response = await fetch('https://sdlive-1-internal.d-ho.me/playlist.m3u8')
|
|
|
|
if (!response.ok) {
|
|
return new Response('Failed to fetch playlist', { status: 500 })
|
|
}
|
|
|
|
const playlist = await response.text()
|
|
|
|
|
|
|
|
return new Response(playlist, {
|
|
headers: {
|
|
'Content-Disposition': 'attachment; filename="sdlive-playlist.m3u8"',
|
|
'Content-Type': 'application/vnd.apple.mpegurl',
|
|
}
|
|
})
|
|
} |