serve_file: add headers

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-11-09 14:38:21 +05:30
parent a805f58243
commit 6df6b4e4f8
3 changed files with 53 additions and 13 deletions

17
Cargo.lock generated
View File

@@ -295,6 +295,16 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "mime_guess"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
dependencies = [
"mime",
"unicase",
]
[[package]]
name = "mio"
version = "1.1.0"
@@ -661,6 +671,12 @@ dependencies = [
"once_cell",
]
[[package]]
name = "unicase"
version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
[[package]]
name = "unicode-ident"
version = "1.0.22"
@@ -789,6 +805,7 @@ version = "0.1.0"
dependencies = [
"axum",
"futures-util",
"mime_guess",
"rand",
"tokio",
"tokio-util",