Allow inline style elements for event-admin CSP
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-24 21:02:33 +01:00
parent 71604c6e41
commit 7a91e40bb3

View File

@@ -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'",