mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Remove cache-control header from HLS queries (#118)
Also minor refactor around cachebusting Fixes #117
This commit is contained in:
parent
7aa7a70d43
commit
cf7ff0a820
@ -48,10 +48,7 @@ class OwncastPlayer {
|
|||||||
init() {
|
init() {
|
||||||
videojs.Hls.xhr.beforeRequest = function (options) {
|
videojs.Hls.xhr.beforeRequest = function (options) {
|
||||||
const cachebuster = Math.round(new Date().getTime() / 1000);
|
const cachebuster = Math.round(new Date().getTime() / 1000);
|
||||||
options.uri = options.uri + "?omgwtf=" + cachebuster;
|
options.uri = `${options.uri}?cachebust=${cachebuster}`;
|
||||||
options.headers = {
|
|
||||||
'Cache-Control':'no-cache'
|
|
||||||
};
|
|
||||||
return options;
|
return options;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -151,4 +148,4 @@ class OwncastPlayer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { OwncastPlayer };
|
export { OwncastPlayer };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user