cloud_bbb/appinfo/app.php

15 lines
474 B
PHP
Raw Normal View History

2020-04-26 11:36:41 +02:00
<?php
OCP\Util::addScript ( 'bbb', 'filelist');
$apiUrl = \OC::$server->getConfig()->getAppValue('bbb', 'api.url');
$parsedApiUrl = @parse_url($apiUrl);
if ($parsedApiUrl !== false) {
$manager = \OC::$server->getContentSecurityPolicyManager();
$policy = new \OCP\AppFramework\Http\EmptyContentSecurityPolicy();
$policy->addAllowedFormActionDomain(($parsedApiUrl['scheme'] ?: 'https') . '://' . $parsedApiUrl['host']);
$manager->addDefaultPolicy($policy);
}