From a7921f6d5b48b274588650cafb81fd310b25b949 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sun, 29 Dec 2024 12:12:24 +0100 Subject: [PATCH] access: Fix 404 when invalid client was specified --- www/access.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/access.php b/www/access.php index 092a4fa..7019b8a 100644 --- a/www/access.php +++ b/www/access.php @@ -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']) {