mirror of
https://github.com/myronblair/jarvis
synced 2026-07-27 16:22:55 -05:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user