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)"; }