| 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 | |
| 88 | private: |
| 89 | hashset<std::string> paths; |