Update root deployment URLs and auth cookie path for non-/mvlog hosting
This commit is contained in:
parent
1f53c448e6
commit
304a146895
3 changed files with 7 additions and 3 deletions
4
auth.php
4
auth.php
|
|
@ -7,7 +7,7 @@ function mvlog_session_start(): void {
|
||||||
session_name('MVLOGSESSID');
|
session_name('MVLOGSESSID');
|
||||||
session_set_cookie_params([
|
session_set_cookie_params([
|
||||||
'lifetime' => 0,
|
'lifetime' => 0,
|
||||||
'path' => '/mvlog',
|
'path' => '/',
|
||||||
'secure' => $secure,
|
'secure' => $secure,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
'samesite' => 'Strict',
|
'samesite' => 'Strict',
|
||||||
|
|
@ -39,7 +39,7 @@ function mvlog_current_user(): ?string {
|
||||||
|
|
||||||
function mvlog_require_login(): void {
|
function mvlog_require_login(): void {
|
||||||
if (mvlog_current_user() !== null) return;
|
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));
|
header('Location: login.php?next=' . rawurlencode($next));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -284,6 +284,10 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<title>MVL</title>
|
<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="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="icon" type="image/png" href="assets/img/moto_travel.png">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
|
||||||
|
|
||||||
if ($articleTitle === '') $articleTitle = mvlog_nice_title((string)$job);
|
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,
|
'q' => $articleTitle,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue