MCPcopy Create free account
hub / github.com/agent-tower/core / isLoopbackHost

Function isLoopbackHost

packages/server/src/middleware/agent-cli-local-only.ts:17–24  ·  view source on GitHub ↗
(host: string | undefined)

Source from the content-addressed store, hash-verified

15}
16
17export function isLoopbackHost(host: string | undefined): boolean {
18 if (!host) return false;
19 const normalized = normalizeHost(host);
20 return normalized === 'localhost'
21 || normalized === '127.0.0.1'
22 || normalized === '::1'
23 || normalized === '0:0:0:0:0:0:0:1';
24}
25
26export function isLoopbackAddress(address: string | undefined): boolean {
27 if (!address) return false;

Callers 1

agentCliLocalOnlyHookFunction · 0.85

Calls 1

normalizeHostFunction · 0.70

Tested by

no test coverage detected