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;
|
||||
}
|
||||
}
|
||||
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']) {
|
||||
|
Reference in New Issue
Block a user