From c30b5b927e669c193bfadd5b590aae66e401c605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sun, 26 Apr 2026 20:47:00 +0800 Subject: [PATCH] fix(htyts): add trailing slash route /api/v1/ts/ to match nginx proxy_pass nginx proxy_pass with location /api/v2/ts/ strips the prefix and appends the remaining path to /api/v1/ts/, resulting in /api/v1/ts/ for root requests. axum routes are exact-match by default, so add the trailing slash variant. --- htyts/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/htyts/src/lib.rs b/htyts/src/lib.rs index 3ef98b0..f259181 100644 --- a/htyts/src/lib.rs +++ b/htyts/src/lib.rs @@ -38,6 +38,7 @@ pub async fn ts_router(db_url: &str, redis_url: &str, zombie_minutes: i64) -> an pub fn ts_router_with_state(state: Arc) -> Router { Router::new() .route("/api/v1/ts", get(handlers::hello_ts)) + .route("/api/v1/ts/", get(handlers::hello_ts)) .route("/api/v1/ts/create_task", post(handlers::create_task)) .route("/api/v1/ts/update_task", post(handlers::update_task)) .route(