Basic m3u passthrough
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
export async function GET(request: Request, res: Response) {
|
||||||
|
const response = await fetch('https://sdlive.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',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user