From caa1ced589aa362ac3c7dc7c510f10327a175e26 Mon Sep 17 00:00:00 2001 From: Jan Koscisz Date: Thu, 14 Dec 2023 14:32:24 +0100 Subject: [PATCH] Proxy health get endpoint --- config.yml | 2 +- src/server.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.yml b/config.yml index c284bf2..64754d8 100644 --- a/config.yml +++ b/config.yml @@ -19,7 +19,7 @@ extensions: max_connections: 2000 http_methods: - path: /health - method: system_health + method: health - path: /liveness method: chain_getBlockHash cors: all diff --git a/src/server.rs b/src/server.rs index 0994de3..b753999 100644 --- a/src/server.rs +++ b/src/server.rs @@ -189,6 +189,8 @@ pub async fn build(config: Config) -> anyhow::Result { module.register_alias(alias_new, alias_old)?; } + module.register_method("health", |_, _| Ok::<_, ErrorObjectOwned>(()))?; + let mut rpc_methods = module.method_names().map(|x| x.to_owned()).collect::>(); rpc_methods.sort();