2026-07-05 00:15:55 +00:00
|
|
|
<?php
|
2026-07-11 14:01:49 +00:00
|
|
|
// Harden the session cookie before it is created (login state rides on it).
|
|
|
|
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
|
|
|
|
$https = (($_SERVER['HTTPS'] ?? '') !== '' && $_SERVER['HTTPS'] !== 'off')
|
|
|
|
|
|| ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '') === 'https';
|
|
|
|
|
session_set_cookie_params([
|
|
|
|
|
'lifetime' => 0,
|
|
|
|
|
'path' => '/',
|
|
|
|
|
'httponly' => true,
|
|
|
|
|
'secure' => $https,
|
|
|
|
|
'samesite' => 'Lax',
|
|
|
|
|
]);
|
|
|
|
|
}
|
2026-07-05 00:15:55 +00:00
|
|
|
@session_start();
|
|
|
|
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
|
require dirname(__DIR__) . '/config.php';
|
|
|
|
|
|
|
|
|
|
define('VIEWS_PATH', __DIR__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$bootstrap = new Bootstrap();
|
|
|
|
|
$bootstrap->init();
|
|
|
|
|
|