MCPcopy Create free account
hub / github.com/parse-community/parse-server / isValidHttpUrl

Method isValidHttpUrl

src/ParseServer.ts:535–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533 // perform a health check on the serverURL value
534 if (Parse.serverURL) {
535 const isValidHttpUrl = string => {
536 let url;
537 try {
538 url = new URL(string);
539 } catch {
540 return false;
541 }
542 return url.protocol === 'http:' || url.protocol === 'https:';
543 };
544 const url = `${Parse.serverURL.replace(/\/$/, '')}/health`;
545 if (!isValidHttpUrl(url)) {
546 // eslint-disable-next-line no-console

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected