Allow inline style elements for event-admin CSP
This commit is contained in:
@@ -33,6 +33,8 @@ class ContentSecurityPolicy
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$allowUnsafeInlineStyles = $request->is('event-admin*');
|
||||||
|
|
||||||
$matomoOrigin = $this->normaliseOrigin(config('services.matomo.url'));
|
$matomoOrigin = $this->normaliseOrigin(config('services.matomo.url'));
|
||||||
$scriptSources = [
|
$scriptSources = [
|
||||||
"'self'",
|
"'self'",
|
||||||
@@ -46,6 +48,9 @@ class ContentSecurityPolicy
|
|||||||
"'nonce-{$styleNonce}'",
|
"'nonce-{$styleNonce}'",
|
||||||
'https:',
|
'https:',
|
||||||
];
|
];
|
||||||
|
if ($allowUnsafeInlineStyles) {
|
||||||
|
$styleSources[] = "'unsafe-inline'";
|
||||||
|
}
|
||||||
|
|
||||||
$connectSources = [
|
$connectSources = [
|
||||||
"'self'",
|
"'self'",
|
||||||
|
|||||||
Reference in New Issue
Block a user