09404db559
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
export const name = "RAZ-Kids";
|
|
export const url = "https://www.raz-kids.com/";
|
|
|
|
// No public status page. Synthetic check against the teacher login portal.
|
|
// Learning A-Z properties are behind Cloudflare bot detection — requires a
|
|
// browser User-Agent to avoid 403 challenges.
|
|
const PROBE_URL =
|
|
"https://accounts.learninga-z.com/ng/member/login?siteAbbr=rk";
|
|
|
|
const HEADERS = {
|
|
"User-Agent":
|
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
|
};
|
|
|
|
export async function checkStatus() {
|
|
const res = await fetch(PROBE_URL, { method: "GET", headers: HEADERS });
|
|
|
|
// Cloudflare managed challenge — JS required, not a real error
|
|
if (res.headers.get("cf-mitigated") === "challenge") {
|
|
return {
|
|
name,
|
|
status: "unknown",
|
|
message: "Cloudflare challenge blocked synthetic check — status cannot be determined.",
|
|
lastUpdated: new Date().toISOString(),
|
|
};
|
|
}
|
|
|
|
return {
|
|
name,
|
|
status: res.ok ? "operational" : "degraded",
|
|
message: res.ok
|
|
? `Login portal responding (HTTP ${res.status}).`
|
|
: `Unexpected response from login portal (HTTP ${res.status}).`,
|
|
lastUpdated: new Date().toISOString(),
|
|
};
|
|
}
|