Skip to content

Commit

Permalink
CSP: Allow loading of workers from blob: URIs (#2765)
Browse files Browse the repository at this point in the history
Fixes issues with VideoJS reported on the community:

https://community.openhab.org/t/openhab-4-3-milestone-discussion/158139/26.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Sep 21, 2024
1 parent 727b876 commit 217fc06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bundles/org.openhab.ui/web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
* allow loading media from any source, and data:, blob: and media: URIs
* allow embedding (<iframe>) any source
* allow connecting (through fetch(), XMLHttpRequest, WebSocket etc.) to the same origin, raw.githubusercontent.com (add-on logos etc.), Iconify icon sources, and any source
* allows loading web workers from the same origin, and blob: URIs
-->
<% if (process.env.NODE_ENV === 'production') { %>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src * data:; media-src * data: blob: media:; frame-src *; connect-src 'self' raw.githubusercontent.com api.iconify.design api.unisvg.com api.simplesvg.com *;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src * data:; media-src * data: blob: media:; frame-src *; connect-src 'self' raw.githubusercontent.com api.iconify.design api.unisvg.com api.simplesvg.com *; worker-src 'self' blob:;">
<% } %>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">

Expand Down

0 comments on commit 217fc06

Please sign in to comment.