Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSP errors from video.min.js #2

Open
BasvanH opened this issue Sep 27, 2022 · 0 comments
Open

CSP errors from video.min.js #2

BasvanH opened this issue Sep 27, 2022 · 0 comments

Comments

@BasvanH
Copy link

BasvanH commented Sep 27, 2022

Hello,

We are integrating the SDK into HabPanel. This is an widget based web ui so you can build dashboards from OpenHab devices. We want to display the camera's with this SDK in a widget.

The CSP policy of HabPanel is:

<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-5hvlzGKhlKhafFjW6G/cRVpM/e+JewYxe/pLpQ5Kj9M='; style-src 'self' 'unsafe-inline';">

When lazy-loading the SDK we get an error on video.min.js

Refused to create a worker from 'blob:http://<webserver>/f675bf28-a6df-4b59-b032-23e6e02326c6' because it violates the following Content Security Policy directive: "script-src 'self' 'sha256-5hvlzGKhlKhafFjW6G/cRVpM/e+JewYxe/pLpQ5Kj9M='". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

We cannot change the CSP policy as it is fixed coded in the HabPanel framework. The author of video.min.js is aware of weak CSP compliance, but it doesn't look like it's top priority. Since this SDK includes video.min.js, what can VXG do regarding this issue?

Regards,
Bastiaan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant