addAllowedImageDomain('*'); $csp->addAllowedMediaDomain('*'); if ($this->config->getSystemValueBool('debug', false)) { /** @psalm-suppress DeprecatedMethod */ $csp->allowEvalScript(); $csp->addAllowedConnectDomain('*'); $csp->addAllowedScriptDomain('*'); } $response = new TemplateResponse(Application::APP_ID, 'main'); $response->setContentSecurityPolicy($csp); return $response; } }