Fix CSRF token handling: add session to index.php, fix cookie_secure for HTTPS

This commit is contained in:
root
2026-02-03 20:51:45 +00:00
parent 72c9b4e9b4
commit 165c418c75
4 changed files with 15 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
// Ensure session cookie is available for AJAX requests
ini_set('session.cookie_samesite', 'Lax');
ini_set('session.cookie_httponly', '1');
ini_set('session.cookie_secure', '0'); // Set to '1' if using HTTPS
ini_set('session.cookie_secure', '1'); // Set to '1' if using HTTPS
session_start();
// Security headers