diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-07-10 22:24:18 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-07-10 22:24:18 +0200 |
| commit | 5e0f55333afd03190d84da8fd21b084775cdf916 (patch) | |
| tree | 5432a628c578feb729ddb9ac04cac7ca617bde4a | |
| parent | de61b163a3d55aee1309ce5a89bfe864d2e08e75 (diff) | |
| parent | 4adb4c00d2099ad7892579bfe4777d6f64a807a0 (diff) | |
| download | invidious-5e0f55333afd03190d84da8fd21b084775cdf916.tar.gz invidious-5e0f55333afd03190d84da8fd21b084775cdf916.tar.bz2 invidious-5e0f55333afd03190d84da8fd21b084775cdf916.zip | |
Allow embedding videos in local HTML files (#4450)
The current Content Security Policy does not allow to embed videos
inside local HTML files which are viewed in the browser via the file
protocol. This commit adds the file protocol to the allowed frame
ancestors, so that the embedded videos load correctly in local HTML
files.
This behaviour is consistent which how the official YouTube website
allows to embed videos from itself.
Closes issue 4448
| -rw-r--r-- | src/invidious/routes/before_all.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/routes/before_all.cr b/src/invidious/routes/before_all.cr index 396840a4..5695dee9 100644 --- a/src/invidious/routes/before_all.cr +++ b/src/invidious/routes/before_all.cr @@ -30,7 +30,7 @@ module Invidious::Routes::BeforeAll # Only allow the pages at /embed/* to be embedded if env.request.resource.starts_with?("/embed") - frame_ancestors = "'self' http: https:" + frame_ancestors = "'self' file: http: https:" else frame_ancestors = "'none'" end |
