From adbd1a7a24febfa0b31e2a3233f72edb12831283 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Sun, 19 Jul 2026 00:51:54 -0500 Subject: [PATCH] Stop flagging parkerslingshotrentals as DOWN: it's intentionally behind a Basic Auth Coming Soon gate during rebuild, so 401 is expected there, not a failure Co-Authored-By: Claude Sonnet 5 --- api/endpoints/facts_collector.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/endpoints/facts_collector.php b/api/endpoints/facts_collector.php index 3229086..19c4e60 100644 --- a/api/endpoints/facts_collector.php +++ b/api/endpoints/facts_collector.php @@ -197,6 +197,11 @@ function collect_all(): array { 'orbisportal' => 'https://orbis.orbishosting.com', 'tomtomgames' => 'https://tomtomgames.com', ]; + // Sites intentionally gated behind HTTP Basic Auth (e.g. a password-protected + // "Coming Soon" page during a rebuild) — treat these status codes as up, not down. + $expectedCodes = [ + 'parkerslingshotrentals' => [401], + ]; $down = []; foreach ($sites as $key => $url) { $parsed = parse_url($url); @@ -216,7 +221,8 @@ function collect_all(): array { curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); - $status = ($code >= 200 && $code < 400) ? 'up' : "down-$code"; + $ok = ($code >= 200 && $code < 400) || in_array($code, $expectedCodes[$key] ?? [], true); + $status = $ok ? 'up' : "down-$code"; KBEngine::storeFact('sites', $key, $status, $url, 180); if ($status !== 'up') $down[] = "$key($code)"; }