MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / hostForUrl

Function hostForUrl

apps/vis/server/src/config.ts:46–49  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

44 * `http://::1:3001/` is an invalid URL. Already-bracketed literals, IPv4
45 * addresses, and hostnames are returned unchanged. */
46export function hostForUrl(host: string): string {
47 if (host.includes(':') && !host.startsWith('[')) return `[${host}]`;
48 return host;
49}
50
51export function resolveVisAuthToken(host: string = resolveHost()): string | undefined {
52 const raw = process.env['VIS_AUTH_TOKEN'];

Callers 3

config.test.tsFile · 0.90
formatStartupBannerFunction · 0.90
startVisServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected