diff options
author | Florian Klink <flokli@flokli.de> | 2024-08-23T07·34+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-08-23T15·02+0000 |
commit | a4ebc8da7cd7232bb709ffa083547431ba65f08c (patch) | |
tree | 6ccb32f6fb3b0f8984736cce7368a393b435ab40 /tvix/nar-bridge/src/nar.rs | |
parent | 35d5811eec4f2d610e811d24b412aa05479a7358 (diff) |
feat(tvix/nar-bridge): send content-type headers r/8561
This prevents browsers from treating NARInfo and nix-cache-info paths as a separate "Download", but just show it in plaintext. Change-Id: If99abe20ef1d24e4fa86c055160861ca47aa81ce Reviewed-on: https://cl.tvl.fyi/c/depot/+/12267 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/nar-bridge/src/nar.rs')
-rw-r--r-- | tvix/nar-bridge/src/nar.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/nar-bridge/src/nar.rs b/tvix/nar-bridge/src/nar.rs index f4471e0735f1..70d9d644c26c 100644 --- a/tvix/nar-bridge/src/nar.rs +++ b/tvix/nar-bridge/src/nar.rs @@ -77,6 +77,7 @@ pub async fn get( .status(StatusCode::OK) .header("cache-control", "max-age=31536000, immutable") .header("content-length", nar_size) + .header("content-type", nix_http::MIME_TYPE_NAR) .body(Body::from_stream(ReaderStream::new(r))) .unwrap()) } |