From 9258c97de8fc830d41f5ea5ace71a65b3c5e468b Mon Sep 17 00:00:00 2001 From: Jorrin Date: Sun, 31 Mar 2024 19:11:09 +0200 Subject: [PATCH] only use normal fetcher if its cors-allowed --- src/utils/valid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/valid.ts b/src/utils/valid.ts index 2f292a2..65db1ea 100644 --- a/src/utils/valid.ts +++ b/src/utils/valid.ts @@ -22,7 +22,7 @@ export async function validatePlayableStream( stream: Stream, ops: ProviderRunnerOptions | IndividualEmbedRunnerOptions, ): Promise { - const fetcher = stream.flags.includes('cors-allowed') ? ops.fetcher : ops.proxiedFetcher; + const fetcher = stream.flags.length === 1 && stream.flags.includes('cors-allowed') ? ops.fetcher : ops.proxiedFetcher; if (stream.type === 'hls') { const headResult = await fetcher.full(stream.playlist, { method: 'HEAD',