Merge pull request #18140 from nextcloud/bugfix/17814/csp-svg

Allow inline styles for theming images
This commit is contained in:
Roeland Jago Douma 2019-12-03 10:48:04 +01:00 committed by GitHub
commit 2b19da84d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View 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 . '"');