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