]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/object-storage-proxy.ts
Fix file token reinjection on fragments
[github/Chocobozzz/PeerTube.git] / server / controllers / object-storage-proxy.ts
index 32b8d21dab1b39b6351201265124861a045647b2..6bff05f14052d9237cd35cecbe65d35114cfc5b0 100644 (file)
@@ -77,7 +77,7 @@ async function proxifyHLS (req: express.Request, res: express.Response) {
     setS3Headers(res, s3Response)
 
     const streamReplacer = filename.endsWith('.m3u8') && doReinjectVideoFileToken(req)
-      ? new StreamReplacer(line => injectQueryToPlaylistUrls(line, buildReinjectVideoFileTokenQuery(req)))
+      ? new StreamReplacer(line => injectQueryToPlaylistUrls(line, buildReinjectVideoFileTokenQuery(req, filename.endsWith('master.m3u8'))))
       : new PassThrough()
 
     return pipeline(