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.
This commit is contained in:
2026-04-26 20:47:00 +08:00
parent 220265195c
commit c30b5b927e
+1
View File
@@ -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<TsState>) -> 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(