MCPcopy Index your code
hub / github.com/labstack/echo / TrustIPRange

Function TrustIPRange

ip.go:168–172  ·  view source on GitHub ↗

TrustIPRange add trustable IP ranges using CIDR notation.

(ipRange *net.IPNet)

Source from the content-addressed store, hash-verified

166
167// TrustIPRange add trustable IP ranges using CIDR notation.
168func TrustIPRange(ipRange *net.IPNet) TrustOption {
169 return func(c *ipChecker) {
170 c.trustExtraRanges = append(c.trustExtraRanges, ipRange)
171 }
172}
173
174func newIPChecker(configs []TrustOption) *ipChecker {
175 checker := &ipChecker{trustLoopback: true, trustLinkLocal: true, trustPrivateNet: true}

Callers 5

TestContext_RealIPFunction · 0.85
TestTrustIPRangeFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestContext_RealIPFunction · 0.68
TestTrustIPRangeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…