MCPcopy Create free account
hub / github.com/compozy/agh / isLoopbackHost

Function isLoopbackHost

internal/api/httpapi/middleware.go:227–233  ·  view source on GitHub ↗
(host string)

Source from the content-addressed store, hash-verified

225}
226
227func isLoopbackHost(host string) bool {
228 if strings.EqualFold(host, "localhost") {
229 return true
230 }
231 ip := net.ParseIP(host)
232 return ip != nil && ip.IsLoopback()
233}
234
235func isWildcardHost(host string) bool {
236 switch host {

Callers 5

canonicalOriginFromURLFunction · 0.85
canonicalOriginFromHostFunction · 0.85
loopbackGuardFunction · 0.85
RegisterRoutesFunction · 0.85

Calls

no outgoing calls