From cf7ff0a820f545a0118be2ad74a1c17476bd79c7 Mon Sep 17 00:00:00 2001 From: Matt Steele Date: Thu, 20 Aug 2020 19:49:11 -0500 Subject: [PATCH] Remove cache-control header from HLS queries (#118) Also minor refactor around cachebusting Fixes #117 --- webroot/js/player.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webroot/js/player.js b/webroot/js/player.js index 986e3566d..337617c93 100644 --- a/webroot/js/player.js +++ b/webroot/js/player.js @@ -48,10 +48,7 @@ class OwncastPlayer { init() { videojs.Hls.xhr.beforeRequest = function (options) { const cachebuster = Math.round(new Date().getTime() / 1000); - options.uri = options.uri + "?omgwtf=" + cachebuster; - options.headers = { - 'Cache-Control':'no-cache' - }; + options.uri = `${options.uri}?cachebust=${cachebuster}`; return options; }; @@ -151,4 +148,4 @@ class OwncastPlayer { } -export { OwncastPlayer }; \ No newline at end of file +export { OwncastPlayer };