fix(csrf): stateless HMAC token to survive page cache
Déploiement PROD / check (push) Successful in 3m26s
Déploiement PROD / deploy (push) Successful in 8s

This commit is contained in:
2026-07-26 18:44:05 +04:00
parent 9109068b0b
commit 5899dfb856
4 changed files with 67 additions and 25 deletions
+7
View File
@@ -102,6 +102,13 @@ if (!defined('ENABLE_USER_ACCOUNTS')) define('ENABLE_USER_ACCOUNTS', false);
if (!defined('CACHE_ENABLED')) define('CACHE_ENABLED', true);
if (!defined('CACHE_DURATION')) define('CACHE_DURATION', 3600); // En secondes (1 heure)
// Clé secrète utilisée pour signer les tokens CSRF stateless.
// À remplacer impérativement dans config.local.php par une valeur aléatoire
// propre à l'instance (ex. bin2hex(random_bytes(32))).
if (!defined('CSRF_SECRET')) {
define('CSRF_SECRET', 'change-me-in-config-local-php');
}
// =========================================
// Configuration de la section Hero (bannière d'accueil)
// =========================================