Files
web_auth/config/session.php

16 lines
396 B
PHP
Raw Permalink Normal View History

2026-01-19 08:57:58 +03:00
<?php
if (session_status() === PHP_SESSION_NONE) {
$isSecure = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
ini_set('session.use_strict_mode', '1');
session_set_cookie_params([
'lifetime' => 0,
2026-01-19 16:41:30 +03:00
'path' => '/',
2026-01-19 08:57:58 +03:00
'domain' => '',
'secure' => $isSecure,
'httponly' => true,
'samesite' => 'Lax',
]);
session_start();
}
?>