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

Function isLoopbackHost

apps/kimi-code/src/cli/sub/server/access-urls.ts:45–47  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

43
44/** True when `host` is a loopback address (this host only). */
45export function isLoopbackHost(host: string): boolean {
46 return host === 'localhost' || host === '127.0.0.1' || host === '::1';
47}
48
49function hostOrigin(host: string, port: number): string {
50 const family = host.includes(':') ? 'IPv6' : 'IPv4';

Callers 2

formatReadyBannerFunction · 0.90
accessUrlLinesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected