Add referrer and origin to vidplay

This commit is contained in:
Ciarands
2024-04-03 15:47:55 +01:00
parent 494b662af7
commit b8570bb560

View File

@@ -29,6 +29,7 @@ export const vidplayScraper = makeEmbed({
} }
const url = new URL(ctx.url); const url = new URL(ctx.url);
console.log(url);
const subtitlesLink = url.searchParams.get('sub.info'); const subtitlesLink = url.searchParams.get('sub.info');
const captions: Caption[] = []; const captions: Caption[] = [];
if (subtitlesLink) { if (subtitlesLink) {
@@ -55,6 +56,10 @@ export const vidplayScraper = makeEmbed({
type: 'hls', type: 'hls',
playlist: source, playlist: source,
flags: [flags.IP_LOCKED], flags: [flags.IP_LOCKED],
headers: {
Referer: url.origin,
Origin: url.origin,
},
captions, captions,
thumbnailTrack, thumbnailTrack,
}, },