Add tower-http crate

This commit is contained in:
Ethan Girouard 2024-03-01 14:35:03 -05:00
parent 37d57eee14
commit 939b14403f
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146
2 changed files with 34 additions and 0 deletions

32
Cargo.lock generated
View File

@ -1341,6 +1341,12 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
[[package]]
name = "http-range-header"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
[[package]] [[package]]
name = "httparse" name = "httparse"
version = "1.8.0" version = "1.8.0"
@ -1854,6 +1860,7 @@ dependencies = [
"time", "time",
"tokio", "tokio",
"tower", "tower",
"tower-http",
"wasm-bindgen", "wasm-bindgen",
] ]
@ -3097,6 +3104,31 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "tower-http"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
dependencies = [
"bitflags 2.4.1",
"bytes",
"futures-core",
"futures-util",
"http",
"http-body",
"http-range-header",
"httpdate",
"mime",
"mime_guess",
"percent-encoding",
"pin-project-lite",
"tokio",
"tokio-util",
"tower-layer",
"tower-service",
"tracing",
]
[[package]] [[package]]
name = "tower-layer" name = "tower-layer"
version = "0.3.2" version = "0.3.2"

View File

@ -44,6 +44,7 @@ futures = { version = "0.3.30", default-features = false, optional = true }
tokio = { version = "1", optional = true } tokio = { version = "1", optional = true }
axum = { version = "0.6.4", optional = true } axum = { version = "0.6.4", optional = true }
tower = { veresion = "0.4.13", optional = true } tower = { veresion = "0.4.13", optional = true }
tower-http = { version = "0.4", optional = true, features = ["fs"] }
[features] [features]
csr = ["leptos/csr", "leptos_meta/csr", "leptos_router/csr"] csr = ["leptos/csr", "leptos_meta/csr", "leptos_router/csr"]
@ -68,6 +69,7 @@ ssr = [
"tokio", "tokio",
"axum", "axum",
"tower", "tower",
"tower-http",
] ]
# Defines a size-optimized profile for the WASM bundle in release mode # Defines a size-optimized profile for the WASM bundle in release mode