Update root deployment URLs and auth cookie path for non-/mvlog hosting

This commit is contained in:
hbrain 2026-06-01 09:15:01 +02:00
parent 1f53c448e6
commit 304a146895
3 changed files with 7 additions and 3 deletions

View file

@ -7,7 +7,7 @@ function mvlog_session_start(): void {
session_name('MVLOGSESSID');
session_set_cookie_params([
'lifetime' => 0,
'path' => '/mvlog',
'path' => '/',
'secure' => $secure,
'httponly' => true,
'samesite' => 'Strict',
@ -39,7 +39,7 @@ function mvlog_current_user(): ?string {
function mvlog_require_login(): void {
if (mvlog_current_user() !== null) return;
$next = $_SERVER['REQUEST_URI'] ?? '/mvlog/new.php';
$next = $_SERVER['REQUEST_URI'] ?? '/new.php';
header('Location: login.php?next=' . rawurlencode($next));
exit;
}