Check if a network address is allowed to access the HTTP server */
| 214 | |
| 215 | /** Check if a network address is allowed to access the HTTP server */ |
| 216 | static bool ClientAllowed(const CNetAddr &netaddr) { |
| 217 | if (!netaddr.IsValid()) { |
| 218 | return false; |
| 219 | } |
| 220 | for (const CSubNet &subnet : rpc_allow_subnets) { |
| 221 | if (subnet.Match(netaddr)) { |
| 222 | return true; |
| 223 | } |
| 224 | } |
| 225 | return false; |
| 226 | } |
| 227 | |
| 228 | /** Initialize ACL list for HTTP server */ |
| 229 | static bool InitHTTPAllowList() { |
no test coverage detected