From f9d3eb1e0da1cd754cf3360567aa796de66c83f6 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 25 Jan 2023 19:05:11 -0800 Subject: [PATCH] cut /rpc/ off --- web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs b/web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs index 72511345..90398f20 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs @@ -166,7 +166,13 @@ impl SentrydSubCommand { // check the main rpc's /health endpoint { - let url = format!("{}/health", primary_proxy); + let url = if primary_proxy.contains("/rpc/") { + let x = primary_proxy.split("/rpc/").next().unwrap(); + + format!("{}/health", x) + } else { + format!("{}/health", primary_proxy) + }; let error_sender = error_sender.clone(); // TODO: what timeout?