Allow inline styles for theming images

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-11-27 20:26:57 +01:00 committed by Backportbot
parent b2a0f2649f
commit 916e3185d8
1 changed files with 3 additions and 0 deletions

View File

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