nearly prod

This commit is contained in:
Jester
2026-01-19 16:41:30 +03:00
parent 5a3494e10d
commit cfa5ad9c28
9 changed files with 158 additions and 1929 deletions

View File

@@ -1,22 +1,10 @@
<?php
if (session_status() === PHP_SESSION_NONE) {
$isSecure = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
$scriptName = $_SERVER['SCRIPT_NAME'] ?? '';
$basePath = '/';
if ($scriptName !== '') {
$basePath = preg_replace('#/api/.*$#', '', $scriptName);
if ($basePath === $scriptName) {
$basePath = dirname($scriptName);
}
$basePath = rtrim($basePath, '/');
if ($basePath === '') {
$basePath = '/';
}
}
ini_set('session.use_strict_mode', '1');
session_set_cookie_params([
'lifetime' => 0,
'path' => $basePath,
'path' => '/',
'domain' => '',
'secure' => $isSecure,
'httponly' => true,