diff --git a/includes/config.php b/includes/config.php index e7757e3..9d9aafa 100644 --- a/includes/config.php +++ b/includes/config.php @@ -1,4 +1,15 @@ 30 * 24 * 60 * 60, + 'path' => '/', + 'secure' => true, + 'httponly' => true, + 'samesite' => 'Strict' +]); + session_start(); class Config { @@ -19,17 +30,4 @@ class Config { $config = self::load(); return $config[$key] ?? $default; } - - public static function save($config) { - $configFile = __DIR__ . '/../config.json'; - - $jsonContent = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); - - if (file_put_contents($configFile, $jsonContent) === false) { - throw new Exception('Impossible de sauvegarder la configuration'); - } - - self::$config = $config; - return true; - } } \ No newline at end of file