Unverified Commit 8a24e245 authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by GitHub
Browse files

feat(server): JSON-RPC specific middleware (#1215)



* refactor new jsonrpc middleware

* add jsonrpsee specific service trait

* use tower::ServiceBuilder for composable middleware

* revert changelog

* fix nits

* types: impl Clone

* clarify examples

* Update server/src/middleware/mod.rs

* Update server/src/transport/http.rs

* remove some boiler plate

* add back logging

* remove needless Arc

* remove clone bounds for Middleware

* add wrapper for tower::ServiceBuilder

* fix docs

* add modify request example

* add rate limit example

* fix some nits in rate limiting middleware example

* Meta -> Context

* restruct middleware module

* fix broken links

* grumbles: remove `Context`

* fix tests

* Update examples/examples/rpc_middleware_modify_request.rs

Co-authored-by: default avatarJames Wilson <[email protected]>

* fix grumbles

* grumbles: adjust docs for method response

* grumbles: MethodKind::Unknown -> NotFound

* Update examples/examples/http_middleware.rs

* fix some nits in examples

---------

Co-authored-by: default avatarJames Wilson <[email protected]>
parent e8bb8bbb
Pipeline #409784 passed with stages
in 1 hour, 7 minutes, and 16 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment