registerSearchProvider(SearchProvider::class); $context->registerDashboardWidget(RadioWidget::class); $context->registerService('request', static function ($c) { return $c->get(IRequest::class); }); $this->registerCsp(); } public function boot(IBootContext $context): void { } /** * Allow radio-browser hosts in the csp * * @throws \OCP\AppFramework\QueryException */ public function registerCsp() { $manager = $this->getContainer()->getServer()->getContentSecurityPolicyManager(); $policy = new ContentSecurityPolicy(); $policy->addAllowedConnectDomain('https://de1.api.radio-browser.info'); $policy->addAllowedImageDomain('*'); $policy->addAllowedMediaDomain('*'); $manager->addDefaultPolicy($policy); } }