mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:53:24 +00:00
only use normal fetcher if its cors-allowed
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user