MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / ClientAllowed

Function ClientAllowed

src/httpserver.cpp:216–226  ·  view source on GitHub ↗

Check if a network address is allowed to access the HTTP server */

Source from the content-addressed store, hash-verified

214
215/** Check if a network address is allowed to access the HTTP server */
216static 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 */
229static bool InitHTTPAllowList() {

Callers 1

http_request_cbFunction · 0.85

Calls 2

IsValidMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected