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;
}

View file

@ -284,6 +284,10 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>MVL</title>
<meta property="og:title" content="MVL">
<meta property="og:description" content="journal of an unreliable narrator.">
<meta property="og:image" content="https://bubulescu.org/assets/img/moto_travel.png">
<meta property="og:url" content="https://bubulescu.org">
<link rel="alternate" type="application/rss+xml" title="MVLog RSS" href="feed.php">
<link rel="icon" type="image/png" href="assets/img/moto_travel.png">
<link rel="stylesheet" href="style.css">

View file

@ -169,7 +169,7 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
if ($articleTitle === '') $articleTitle = mvlog_nice_title((string)$job);
$filterUrl = 'https://bubulescu.org/mvlog/?' . http_build_query([
$filterUrl = 'https://bubulescu.org/?' . http_build_query([
'q' => $articleTitle,
]);