access: Fix 404 when invalid client was specified

This commit is contained in:
2024-12-29 12:12:24 +01:00
parent 34e5c44115
commit a7921f6d5b

View File

@ -17,14 +17,14 @@ foreach ($COMBINED_ACCESS as $name => $data) {
$client['id'] = $name;
}
}
if ($_SERVER['PATH_INFO'] !== "/$client[id]/") {
header('Status: 308');
header("Location: /access/$client[id]/");
exit();
} else if ($client === null) {
if ($client === null) {
header('Status: 404');
header('Content-Length: 0');
exit();
} else if ($_SERVER['PATH_INFO'] !== "/$client[id]/") {
header('Status: 308');
header("Location: /access/$client[id]/");
exit();
}
if ($client['api']) {