documentserver_community
documentserver_community copied to clipboard
CSP header
In the StaticController, the CSP policy is defined, but the CSP header is not set. => the OO window can't open in nextcloud
fixed it that way
$csp = new ContentSecurityPolicy();
$csp->addAllowedScriptDomain($this->request->getServerHost());
$csp->addAllowedScriptDomain('\'unsafe-eval\'');
$csp->addAllowedScriptDomain('\'unsafe-inline\'');
$csp->addAllowedFrameDomain($this->request->getServerHost());
$response->setContentSecurityPolicy($csp);
//ADD THIS $response->addHeader('Content-Security-Policy', $csp->buildPolicy());
can't commit cause i'm part of this project