MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeBaseUrl

Function normalizeBaseUrl

apps/sim/lib/core/utils/urls.ts:11–18  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

9}
10
11function normalizeBaseUrl(url: string): string {
12 if (hasHttpProtocol(url)) {
13 return url
14 }
15
16 const protocol = isProd ? 'https://' : 'http://'
17 return `${protocol}${url}`
18}
19
20/**
21 * Returns the base URL of the application from NEXT_PUBLIC_APP_URL

Callers 1

getBaseUrlFunction · 0.70

Calls 1

hasHttpProtocolFunction · 0.85

Tested by

no test coverage detected