diff --git a/src/routes/m3u8-proxy.ts b/src/routes/m3u8-proxy.ts index 9a0233d..b2fcbd8 100644 --- a/src/routes/m3u8-proxy.ts +++ b/src/routes/m3u8-proxy.ts @@ -68,8 +68,8 @@ async function proxyM3U8(event: any) { try { // Use native fetch instead of axios - const response = await fetch(url, { - headers: headers as HeadersInit + const response = await globalThis.fetch(url, { + headers: headers as HeadersInit }); if (!response.ok) { diff --git a/src/routes/ts-proxy.ts b/src/routes/ts-proxy.ts index bbe4e0b..2153bb4 100644 --- a/src/routes/ts-proxy.ts +++ b/src/routes/ts-proxy.ts @@ -33,7 +33,7 @@ export default defineEventHandler(async (event) => { } try { - const response = await fetch(url, { + const response = await globalThis.fetch(url, { method: 'GET', headers: { ...headers as HeadersInit,