mirror of
https://github.com/sussy-code/providers.git
synced 2026-03-23 19:27:47 +00:00
only use normal fetcher if its cors-allowed
This commit is contained in:
parent
55f963611c
commit
9258c97de8
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ export async function validatePlayableStream(
|
|||
stream: Stream,
|
||||
ops: ProviderRunnerOptions | IndividualEmbedRunnerOptions,
|
||||
): Promise<Stream | null> {
|
||||
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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue