MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / ClientAllowed

Function ClientAllowed

src/rpc/core/httpserver.cpp:169–174  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

167
168/** Check if a network address is allowed to access the HTTP server */
169static bool ClientAllowed(const CNetAddr& netaddr) {
170 if (!netaddr.IsValid()) return false;
171 for (const CSubNet& subnet : rpc_allow_subnets)
172 if (subnet.Match(netaddr)) return true;
173 return false;
174}
175
176/** Initialize ACL list for HTTP server */
177static bool InitHTTPAllowList() {

Callers 1

http_request_cbFunction · 0.85

Calls 2

IsValidMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected