Openstatus www.openstatus.dev
at 4c0f4c00a38753a5d0dfd7e7b7b7706dec6f1503 10 lines 332 B view raw
1export const isAnInvalidTestUrl = (rawUrl: string) => { 2 const url = new URL(rawUrl); 3 const isSelfHostName = url.hostname 4 .split(".") 5 .slice(-2) // ex: any.sub.openstatus.dev 6 .join(".") 7 .includes("openstatus.dev"); // ex: openstatus.dev:80 8 9 return isSelfHostName && url.pathname.startsWith("/api/checker/"); 10};