Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
tomasz1986 ea56e25b03
Merge 4adb4c00d2 into b673695aa2 2024-04-17 13:15:49 +02:00
Tomasz Wilczyński 4adb4c00d2
routes: Allow embedding videos in local HTML files (fixes #4448)
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.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
2024-02-24 20:01:16 +01:00
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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