aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Files
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-03-19 23:44:14 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-03-19 23:44:14 +0100
commitb285e19dc8845cd41b5065c56613e75be7e8a222 (patch)
treec59f82f49e67661e74b5f11d3fd8934fb303234a /apps/dav/lib/Files
parentd3401efa2d368e420c8d805a03c6779a2b9f5234 (diff)
downloadnextcloud-server-b285e19dc8845cd41b5065c56613e75be7e8a222.tar.gz
nextcloud-server-b285e19dc8845cd41b5065c56613e75be7e8a222.zip
fix dav browser error page not styled
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/dav/lib/Files')
-rw-r--r--apps/dav/lib/Files/BrowserErrorPagePlugin.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
index e1e64b3e6f4..3502acde974 100644
--- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php
+++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
@@ -25,6 +25,7 @@ namespace OCA\DAV\Files;
use OC\AppFramework\Http\Request;
use OC_Template;
+use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\IRequest;
use Sabre\DAV\Exception;
use Sabre\DAV\Server;
@@ -82,6 +83,8 @@ class BrowserErrorPagePlugin extends ServerPlugin {
$this->server->httpResponse->setStatus($httpCode);
$body = $this->generateBody();
$this->server->httpResponse->setBody($body);
+ $csp = new ContentSecurityPolicy();
+ $this->server->httpResponse->addHeader('Content-Security-Policy', $csp->buildPolicy());
$this->sendResponse();
}