feat: improve security headers and csp nonce handling

This commit is contained in:
2026-07-08 07:33:40 +04:00
parent 05d01fb7bc
commit 3e249bbc34
11 changed files with 62 additions and 42 deletions
+2 -1
View File
@@ -313,7 +313,8 @@ function getBaseUrl() {
* @param string $jsonLd Données JSON-LD
*/
function outputJsonLd($jsonLd) {
echo '<script type="application/ld+json">' . "\n" . $jsonLd . "\n" . '</script>' . "\n";
$nonce = getCspNonce();
echo '<script type="application/ld+json" nonce="' . $nonce . '">' . "\n" . $jsonLd . "\n" . '</script>' . "\n";
}
?>