MCPcopy Index your code
hub / github.com/coder/coder / isContainedIn

Function isContainedIn

coderd/httpmw/realip.go:211–219  ·  view source on GitHub ↗

isContainedIn checks that the given address is contained in the given network.

(networks []*net.IPNet, address net.IP)

Source from the content-addressed store, hash-verified

209// isContainedIn checks that the given address is contained in the given
210// network.
211func isContainedIn(networks []*net.IPNet, address net.IP) bool {
212 for _, network := range networks {
213 if network.Contains(address) {
214 return true
215 }
216 }
217
218 return false
219}
220
221// RealIPState is the original state prior to modification by this middleware,
222// useful for getting information about the connecting client if needed.

Callers 3

ExtractRealIPAddressFunction · 0.85
EffectiveHostFunction · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected