diff --git a/auth.php b/auth.php index f9dec0b..42d8a1c 100644 --- a/auth.php +++ b/auth.php @@ -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; } diff --git a/index.php b/index.php index 3cf5172..f29e631 100644 --- a/index.php +++ b/index.php @@ -284,6 +284,10 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];