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

Function hostOrigin

apps/kimi-code/src/cli/sub/server/access-urls.ts:49–52  ·  view source on GitHub ↗
(host: string, port: number)

Source from the content-addressed store, hash-verified

47}
48
49function hostOrigin(host: string, port: number): string {
50 const family = host.includes(':') ? 'IPv6' : 'IPv4';
51 return `http://${formatHostForUrl(host, family)}:${port}`;
52}
53
54/**
55 * Compute the access-URL lines for a bind host/port.

Callers 1

accessUrlLinesFunction · 0.85

Calls 1

formatHostForUrlFunction · 0.90

Tested by

no test coverage detected