MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isLocalhost

Function isLocalhost

freebuff/web/src/app/api/auth/cli/code/_origin.ts:27–35  ·  view source on GitHub ↗
(hostname: string)

Source from the content-addressed store, hash-verified

25}
26
27function isLocalhost(hostname: string) {
28 const normalizedHostname = hostname.replace(/^\[|\]$/g, '')
29 return (
30 normalizedHostname === 'localhost' ||
31 normalizedHostname === '127.0.0.1' ||
32 normalizedHostname === '0.0.0.0' ||
33 normalizedHostname === '::1'
34 )
35}

Callers 1

getUsableOriginFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected