Skip to content

Commit

Permalink
Disable HTTP2
Browse files Browse the repository at this point in the history
HTTP version 2 is not used by the clients so having it enabled just
makes attack surface bigger without providing benefits.
  • Loading branch information
Kixunil committed Jul 13, 2024
1 parent 79de95c commit 8f9bcb1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 51 deletions.
50 changes: 0 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ configure_me = { version = "0.4.0" }
futures = "0.3.12"
hex = "0.4.2"
http = "0.2.3"
hyper = { version = "0.14.4", features = ["client", "server", "stream", "http2", "http1", "tcp"] }
hyper = { version = "0.14.4", features = ["client", "server", "stream", "http1", "tcp"] }
itertools = "0.10.0"
lazy_static = "1.4.0"
linear-map = { version = "1.2.0", features = ["serde_impl"] }
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub async fn compat_main(
let server = Server::builder(hyper::server::accept::from_stream(TcpListenerCompat(
listener,
)))
.http1_only(true)
.serve(make_service);

Ok(server.await?)
Expand Down

0 comments on commit 8f9bcb1

Please sign in to comment.