From e59458222d02849af3cc0a41484cec0adfd5969f Mon Sep 17 00:00:00 2001 From: IEduStu <125146135+IEduStu@users.noreply.github.com> Date: Sat, 20 Apr 2024 17:08:49 +0000 Subject: [PATCH] fix: support http streaming server URLs --- http_server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http_server.js b/http_server.js index 56cdbac10..e2be28a0a 100755 --- a/http_server.js +++ b/http_server.js @@ -16,6 +16,9 @@ express().use(express.static(build_path, { setHeaders: (res, path) => { if (path === index_path) res.set('cache-control', `public, max-age: ${INDEX_CACHE}`); else res.set('cache-control', `public, max-age: ${ASSETS_CACHE}`); + + // allow using a streaming server URL that uses http, like for when hosting a streaming server on a local network + res.set('Content-Security-Policy', 'upgrade-insecure-requests'); } })).all('*', (_req, res) => { // TODO: better 404 page