MCPcopy Create free account
hub / github.com/zalando/skipper / stripPort

Function stripPort

logging/access.go:62–68  ·  view source on GitHub ↗

strip port from addresses with hostname, ipv4 or ipv6

(address string)

Source from the content-addressed store, hash-verified

60
61// strip port from addresses with hostname, ipv4 or ipv6
62func stripPort(address string) string {
63 if h, _, err := net.SplitHostPort(address); err == nil {
64 return h
65 }
66
67 return address
68}
69
70// The remote host of the client. When the 'X-Forwarded-For'
71// header is set, then its value is used as is.

Callers 1

remoteHostFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…