diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 080c3c5..a8f9df7 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] client = { path = "../client" } -clap = { version = "4.0.5", default-features = false, features = ["derive", "std"] } +clap = { version = "4.0.5", default-features = false, features = ["derive", "std", "error-context", "suggestions", "help"] } tokio = { version = "1.38.0", default-features = false, features = ["rt-multi-thread", "macros"] } prost = { version = "0.11.6", default-features = false} diff --git a/server/src/service.rs b/server/src/service.rs index ef4aa25..5f1f8f7 100644 --- a/server/src/service.rs +++ b/server/src/service.rs @@ -46,7 +46,8 @@ impl Service> for NodeService { fn call(&self, req: Request) -> Self::Future { let node = Arc::clone(&self.node); - match req.uri().path() { + // Exclude '/' from path pattern matching. + match &req.uri().path()[1..] { ONCHAIN_RECEIVE_PATH => { Box::pin(handle_request(node, req, handle_onchain_receive_request)) },