MCPcopy Create free account
hub / github.com/ElementsProject/elements / ClientAllowed

Function ClientAllowed

src/httpserver.cpp:152–160  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

150
151/** Check if a network address is allowed to access the HTTP server */
152static bool ClientAllowed(const CNetAddr& netaddr)
153{
154 if (!netaddr.IsValid())
155 return false;
156 for(const CSubNet& subnet : rpc_allow_subnets)
157 if (subnet.Match(netaddr))
158 return true;
159 return false;
160}
161
162/** Initialize ACL list for HTTP server */
163static bool InitHTTPAllowList()

Callers 1

http_request_cbFunction · 0.85

Calls 2

IsValidMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected