MCPcopy Create free account
hub / github.com/3rdparty/libprocess / apply

Method apply

include/process/firewall.hpp:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 ~DisabledEndpointsFirewallRule() override {}
76
77 Option<http::Response> apply(
78 const network::inet::Socket&,
79 const http::Request& request) override
80 {
81 if (paths.contains(request.url.path)) {
82 return http::Forbidden("Endpoint '" + request.url.path + "' is disabled");
83 }
84
85 return None();
86 }
87
88private:
89 hashset<std::string> paths;

Callers 1

foreachFunction · 0.80

Calls 1

ForbiddenClass · 0.85

Tested by

no test coverage detected