Skip to content

Commit

Permalink
Proxy health get endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kostekIV committed Dec 14, 2023
1 parent 9a1124f commit caa1ced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extensions:
max_connections: 2000
http_methods:
- path: /health
method: system_health
method: health
- path: /liveness
method: chain_getBlockHash
cors: all
Expand Down
2 changes: 2 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ pub async fn build(config: Config) -> anyhow::Result<SubwayServerHandle> {
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::<Vec<_>>();

rpc_methods.sort();
Expand Down

0 comments on commit caa1ced

Please sign in to comment.