Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_videoplayer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-01-18 14:34:55 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-01-18 14:34:55 +0300
commitc41301611cfd9fe2ab1d1e9f16442f076f37cff2 (patch)
treec1daf4da4ada86f262e44a121e0b4b2e91cb0b91
parent0dc9badd6c9a368c86bcf92799804fd550ab752b (diff)
Set the CSP worker-src to allow blobs
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rwxr-xr-xappinfo/app.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index d3e5ec6..a250b93 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -17,3 +17,9 @@
OCP\Util::addStyle( 'files_videoplayer', 'style' );
OCP\Util::addscript( 'files_videoplayer', 'main');
+
+$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
+$csp->addAllowedWorkerSrcDomain('\'self\'');
+$csp->addAllowedWorkerSrcDomain('blob:');
+$cspManager = \OC::$server->query(\OCP\Security\IContentSecurityPolicyManager::class);
+$cspManager->addDefaultPolicy($csp);