MCPcopy
hub / github.com/Waishnav/devspace / parsePublicBaseUrl

Function parsePublicBaseUrl

src/config.ts:243–249  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

241}
242
243function parsePublicBaseUrl(value: string): string {
244 const parsed = new URL(value);
245 parsed.hash = "";
246 parsed.search = "";
247 parsed.pathname = parsed.pathname.replace(/\/+$/, "");
248 return parsed.toString().replace(/\/$/, "");
249}
250
251function localPublicBaseUrl(host: string, port: number): string {
252 const publicHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;

Callers 1

loadConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected