]> source.dussan.org Git - nextcloud-server.git/commitdiff
Allow inline styles for theming images 18140/head
authorJulius Härtl <jus@bitgrid.net>
Wed, 27 Nov 2019 19:26:57 +0000 (20:26 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 27 Nov 2019 19:26:57 +0000 (20:26 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/theming/lib/Controller/ThemingController.php

index 25c2273279eb2c01ffe515148d014fbd8a4d6294..34ea22207ce7b1162a85cadfa78a7a00f8cac033 100644 (file)
@@ -379,6 +379,9 @@ class ThemingController extends Controller {
                }
 
                $response = new FileDisplayResponse($file);
+               $csp = new Http\ContentSecurityPolicy();
+               $csp->allowInlineStyle();
+               $response->setContentSecurityPolicy($csp);
                $response->cacheFor(3600);
                $response->addHeader('Content-Type', $this->config->getAppValue($this->appName, $key . 'Mime', ''));
                $response->addHeader('Content-Disposition', 'attachment; filename="' . $key . '"');