From ccc1a9556cbcf0f3063b59187f6ba5e61c8b1c97 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 6 Oct 2023 20:37:43 -0400 Subject: [PATCH] Fix routing --- Cargo.lock | 9 ++++----- Cargo.toml | 3 ++- index.html | 12 ++++++------ src/main.rs | 38 +++++++++++++++++++++++++++----------- 4 files changed, 39 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b838d1..d8ec9dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1643,9 +1643,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "3ce4ef31cda248bbdb6e6820603b82dfcd9e833db65a43e997a0ccec777d11fe" [[package]] name = "httparse" @@ -2960,9 +2960,8 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +version = "0.4.2" +source = "git+https://github.com/austenadler/tower-http?branch=serve-dir-mount-point#0b6ba8e6b70514753961ed93600c5372530b729c" dependencies = [ "bitflags 2.4.0", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 2673d8d..ec552ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" tokio = { version = "1.32.0", features = ["net", "rt", "macros", "rt-multi-thread", "process", "io-util"] } tower = "0.4.13" -tower-http = { version = "0.4.4", features = ["fs", "tracing", "trace"] } +# Use this until https://github.com/tokio-rs/axum/issues/1731 works +tower-http = { git = "https://github.com/austenadler/tower-http", branch = "serve-dir-mount-point", features = ["fs", "tracing", "trace"] } tracing = "0.1.37" tracing-subscriber = "0.3.17" diff --git a/index.html b/index.html index 5c9f157..608dca1 100644 --- a/index.html +++ b/index.html @@ -36,11 +36,11 @@ - +