isContainedIn checks that the given address is contained in the given network.
(networks []*net.IPNet, address net.IP)
| 209 | // isContainedIn checks that the given address is contained in the given |
| 210 | // network. |
| 211 | func 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. |
no test coverage detected