-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat: add compression support to metrics and RPC servers #4906
Conversation
src/rpc/mod.rs
Outdated
@@ -485,6 +486,13 @@ where | |||
svc_builder, | |||
keystore, | |||
} = per_conn.clone(); | |||
let http_middleware = tower::ServiceBuilder::new() | |||
// This does not compile yet, a fix has been made in https://github.com/paritytech/jsonrpsee/pull/1475 | |||
// .layer(CompressionLayer::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can uncomment this line in a subsequent PR once a new version of jsonrpsee
is released.
@@ -184,7 +184,8 @@ tokio = { version = "1", features = ['full'] } | |||
tokio-stream = { version = "0.1", features = ["fs", "io-util"] } | |||
tokio-util = { version = "0.7", features = ["compat", "io-util"] } | |||
toml = "0.8" | |||
tower = { version = "0.5", features = ["full"] } | |||
tower = { version = "0.4", features = ["util"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downgrade tower
to align with jsonrpsee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanabi1224 Should we put a comment here so that people avoid updating (and a similar one in the jsonrpsee
so that people update it when needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LesnyRumcajs Now It does not compile if tower and jsonrpsee versions don't match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LesnyRumcajs Now It does not compile if tower and jsonrpsee versions don't match
Summary of changes
Part of #4903
Changes introduced in this pull request:
blocked on fix(server): make tower::Service impl generic over HttpBody paritytech/jsonrpsee#1475)Authorization
request header as sensitive so it doesn't show in logsjsonrpsee
Reference issue to close (if applicable)
Closes #4903
Other information and links
Change checklist