access: Fix 404 when invalid client was specified
This commit is contained in:
@ -17,14 +17,14 @@ foreach ($COMBINED_ACCESS as $name => $data) {
|
|||||||
$client['id'] = $name;
|
$client['id'] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_SERVER['PATH_INFO'] !== "/$client[id]/") {
|
if ($client === null) {
|
||||||
header('Status: 308');
|
|
||||||
header("Location: /access/$client[id]/");
|
|
||||||
exit();
|
|
||||||
} else if ($client === null) {
|
|
||||||
header('Status: 404');
|
header('Status: 404');
|
||||||
header('Content-Length: 0');
|
header('Content-Length: 0');
|
||||||
exit();
|
exit();
|
||||||
|
} else if ($_SERVER['PATH_INFO'] !== "/$client[id]/") {
|
||||||
|
header('Status: 308');
|
||||||
|
header("Location: /access/$client[id]/");
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($client['api']) {
|
if ($client['api']) {
|
||||||
|
Reference in New Issue
Block a user