Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[http server]: health_api is rather confusing because it's not exclusive for /health #765

Closed
niklasad1 opened this issue May 11, 2022 · 2 comments · Fixed by #859
Closed
Assignees

Comments

@niklasad1
Copy link
Member

#763 (comment)

Additionally the API is quite easy to misuse if one passes in something like a path with / and similar.

@tarrencev
Copy link

I think it makes sense to allow arbitrary registration of get hooks. Kubernetes for example supports both a ready and live endpoint and a consumer might want to expose metrics through another path too.

@jsdw
Copy link
Collaborator

jsdw commented Aug 17, 2022

We're hoping that, now we support tower middleware on the HTTP server, that we might be able to remove this /health stuff from the core jsonrpsee code and provide it as a piece of middlewhere instead which might look like (names all made up):

let layer = ProxyGetRequestLayer::new("/health", "health_rpc_call");

And internally this middleware would look for matching HTTP requests and convert them into jsonrpc requests to pass on, and then strip the jsonrpsee outer stuff from the response too before passing it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants