MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / validateUrl

Function validateUrl

panel/src/app/routers/settings_router.ts:119–123  ·  view source on GitHub ↗
(url: string, name: string)

Source from the content-addressed store, hash-verified

117 const userinfoUrl = config.ssoUserinfoUrl != null ? String(config.ssoUserinfoUrl) : systemConfig.ssoUserinfoUrl;
118
119 const validateUrl = (url: string, name: string) => {
120 if (url && !url.startsWith("https://") && !url.startsWith("http://")) {
121 throw new Error(`SSO ${name} must use http(s) protocol`);
122 }
123 };
124 validateUrl(authorizeUrl, "Authorize URL");
125 validateUrl(tokenUrl, "Token URL");
126 validateUrl(userinfoUrl, "Userinfo URL");

Callers 1

settings_router.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected