Skip to content

Commit

Permalink
Csp: Include `script-src 'self';
Browse files Browse the repository at this point in the history
fixes #5180
  • Loading branch information
nilmerg committed Feb 2, 2024
1 parent cd2daeb commit 0258676
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Icinga/Util/Csp.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ public static function addHeader(Response $response): void
throw new RuntimeException('No nonce set for CSS');
}

$response->setHeader('Content-Security-Policy', "style-src 'self' 'nonce-$csp->styleNonce';", true);
$response->setHeader(
'Content-Security-Policy',
"script-src 'self'; style-src 'self' 'nonce-$csp->styleNonce';",
true
);
}

/**
Expand Down

0 comments on commit 0258676

Please sign in to comment.