diff options
author | Florian Klink <flokli@flokli.de> | 2024-09-29T19·07+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-09-30T10·05+0000 |
commit | 752f1f82a6f6e81be1eaf0d4cf1518b1ddbc711e (patch) | |
tree | 3e5a8e47fb41b78588cd274c295ad15c4dd6cfe5 /tvix/nar-bridge/src/lib.rs | |
parent | 2e4a373a040b5e8355d05b8030341494d1ff386b (diff) |
feat(tvix/nar-bridge): treat HEAD requests explicitly r/8738
We don't need to access castore for HEAD requests. Change-Id: I9365d9520d5a9e52ed92897d3c4972ec5b6e11fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/12547 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nar-bridge/src/lib.rs')
-rw-r--r-- | tvix/nar-bridge/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tvix/nar-bridge/src/lib.rs b/tvix/nar-bridge/src/lib.rs index 79f9b7372245..c4a6c8d5f2dc 100644 --- a/tvix/nar-bridge/src/lib.rs +++ b/tvix/nar-bridge/src/lib.rs @@ -58,7 +58,8 @@ pub fn gen_router(priority: u64) -> Router<AppState> { .route("/nar/:nar_str", get(four_o_four)) .route("/nar/:nar_str", head(four_o_four)) .route("/nar/:nar_str", put(nar::put)) - .route("/nar/tvix-castore/:root_node_enc", get(nar::get)) + .route("/nar/tvix-castore/:root_node_enc", get(nar::get_head)) + .route("/nar/tvix-castore/:root_node_enc", head(nar::get_head)) .route("/:narinfo_str", get(narinfo::get)) .route("/:narinfo_str", head(narinfo::head)) .route("/:narinfo_str", put(narinfo::put)) |