MCPcopy
hub / github.com/cpaczek/skylight / isLoopbackV4

Function isLoopbackV4

server/src/allowed-hosts.ts:49–52  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

47}
48
49function isLoopbackV4(host: string): boolean {
50 const ip = parseIPv4(host);
51 return ip !== null && ip[0] === 127;
52}
53
54function stripPort(rawHost: string): string {
55 if (rawHost.startsWith("[")) {

Callers 1

testHostnameFunction · 0.85

Calls 1

parseIPv4Function · 0.85

Tested by

no test coverage detected