MCPcopy
hub / github.com/inkeep/open-knowledge / isLoopbackAddress

Function isLoopbackAddress

packages/server/src/loopback.ts:1–7  ·  view source on GitHub ↗
(remote: string | undefined)

Source from the content-addressed store, hash-verified

1export function isLoopbackAddress(remote: string | undefined): boolean {
2 if (!remote) return false;
3 if (remote === '::1') return true;
4 if (remote.startsWith('::ffff:127.')) return true;
5 if (remote.startsWith('127.')) return true;
6 return false;
7}
8
9export function isAllowedWorkspaceHostHeader(host: string | undefined): boolean {
10 if (!host) return false;

Callers 14

handlePrincipalFunction · 0.90
handleEmbedDetectFunction · 0.90
handleWorkspaceFunction · 0.90
handleApiConfigFunction · 0.90
onRequestFunction · 0.90
onRequestFunction · 0.90
loopback.test.tsFile · 0.90
onRequestFunction · 0.90
runContentFunction · 0.90
onUpgradeFunction · 0.90
onAuthenticateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected