Openstatus www.openstatus.dev
at 08045c48ade057a8df33c4948cbcde8fece10824 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};