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

Function newIPChecker

ip.go:174–180  ·  view source on GitHub ↗
(configs []TrustOption)

Source from the content-addressed store, hash-verified

172}
173
174func newIPChecker(configs []TrustOption) *ipChecker {
175 checker := &ipChecker{trustLoopback: true, trustLinkLocal: true, trustPrivateNet: true}
176 for _, configure := range configs {
177 configure(checker)
178 }
179 return checker
180}
181
182func (c *ipChecker) trust(ip net.IP) bool {
183 if c.trustLoopback && ip.IsLoopback() {

Callers 7

TestTrustIPRangeFunction · 0.85
TestTrustPrivateNetFunction · 0.85
TestTrustLinkLocalFunction · 0.85
TestTrustLoopbackFunction · 0.85
ExtractIPFromXFFHeaderFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestTrustIPRangeFunction · 0.68
TestTrustPrivateNetFunction · 0.68
TestTrustLinkLocalFunction · 0.68
TestTrustLoopbackFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…