From c612423a4d64f0adbef135074fc55dcc1c362f84 Mon Sep 17 00:00:00 2001 From: Emilien Devos <4016501+unixfox@users.noreply.github.com> Date: Mon, 21 Oct 2024 01:20:16 +0200 Subject: [PATCH] fixing condition for Content-Security-Policy --- src/invidious/routes/watch.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index 961d7b31..2cf8a725 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -190,7 +190,7 @@ module Invidious::Routes::Watch captions: video.captions ) - if (CONFIG.invidious_companion && env.params.query["local"] == true) + if (CONFIG.invidious_companion && (preferences.local || preferences.quality == "dash")) env.response.headers["Content-Security-Policy"] = env.response.headers["Content-Security-Policy"] .gsub("media-src", "media-src " + video.invidious_companion["baseUrl"].as_s)