Fix CORS header on local subtitles

This commit is contained in:
hensm
2020-01-19 22:08:14 +00:00
parent d90bb008fb
commit bbfc380f4a
2 changed files with 3 additions and 1 deletions

View File

@@ -441,6 +441,8 @@ async function handleMediaServerMessage (message: Message) {
const vttSource = subtitles.get(req.url)!;
const vttStream = stream.Readable.from(vttSource);
res.setHeader("Access-Control-Allow-Origin", "*");
vttStream.pipe(res);
}