From c7b1b2b57eadb5038e333f7b7b8686c6586f2ed8 Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Mon, 9 Sep 2024 22:24:56 +0200 Subject: [PATCH] fix: Mixed content on redirect --- packages/stitcher/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/stitcher/src/index.ts b/packages/stitcher/src/index.ts index e762da7e..9cbbae20 100644 --- a/packages/stitcher/src/index.ts +++ b/packages/stitcher/src/index.ts @@ -43,8 +43,11 @@ async function buildServer() { const session = await createSession(body); + const baseUrl = + env.STITCHER_BASE_URL ?? `${request.protocol}://${request.hostname}`; + return reply.redirect( - `${request.protocol}://${request.hostname}/session/${session.id}/master.m3u8`, + `${baseUrl}/session/${session.id}/master.m3u8`, 302, ); },