diff --git a/Cargo.lock b/Cargo.lock index 6060c734..ca4e5b4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -752,6 +752,28 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-extra" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45bf463831f5131b7d3c756525b305d40f1185b688565648a92e1392ca35713d" +dependencies = [ + "axum", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "serde", + "tower 0.5.2", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-server" version = "0.7.2" @@ -7082,6 +7104,7 @@ dependencies = [ "async-trait", "atoi", "axum", + "axum-extra", "axum-server", "bytes", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8618c151..a7d2b06d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ common = { path = "./common/common" } policy = { path = "./policy" } hex = "0.4.3" hyper = "1.6.0" -hyper-util = { version = "0.1.10", features = [ +hyper-util = { version = "0.1.11", features = [ "tokio", "server-auto", "server-graceful", @@ -133,6 +133,7 @@ uuid = { version = "1.15.1", features = [ "macro-diagnostics", ] } axum = "0.8.3" +axum-extra = "0.10.1" axum-server = { version = "0.7.2", features = ["tls-rustls"] } md-5 = "0.10.6" workers = { path = "./common/workers" } diff --git a/rustfs/Cargo.toml b/rustfs/Cargo.toml index 09938aaa..1ab8beb8 100644 --- a/rustfs/Cargo.toml +++ b/rustfs/Cargo.toml @@ -70,6 +70,7 @@ transform-stream.workspace = true uuid = "1.15.1" url.workspace = true axum.workspace = true +axum-extra = { workspace = true } axum-server = { workspace = true } matchit = "0.8.4" shadow-rs.workspace = true diff --git a/rustfs/src/console.rs b/rustfs/src/console.rs index bf50a423..6b3e507f 100644 --- a/rustfs/src/console.rs +++ b/rustfs/src/console.rs @@ -1,12 +1,12 @@ use crate::license::get_license; use axum::{ body::Body, - extract::Host, http::{Response, StatusCode}, response::IntoResponse, routing::get, Router, }; +use axum_extra::extract::Host; use axum_server::tls_rustls::RustlsConfig; use mime_guess::from_path; use rust_embed::RustEmbed; diff --git a/rustfs/src/service.rs b/rustfs/src/service.rs index 7262fb68..d04729e2 100644 --- a/rustfs/src/service.rs +++ b/rustfs/src/service.rs @@ -80,8 +80,7 @@ pin_project! { impl Default for HybridBody where RestBody: Default, - - GrpcBody: Default, + // GrpcBody: Default, { fn default() -> Self { Self::Rest {