diff --git a/ee/tabby-webserver/src/ui.rs b/ee/tabby-webserver/src/ui.rs index 50d80df..4c462cb 100644 --- a/ee/tabby-webserver/src/ui.rs +++ b/ee/tabby-webserver/src/ui.rs @@ -37,10 +37,8 @@ pub async fn handler(uri: Uri) -> impl IntoResponse { let mut path = uri.path().trim_start_matches('/').to_string(); if path.is_empty() { path = "index.html".to_owned() - } else if path == "playground" { - path = "playground.html".to_owned(); - } else if path == "swagger" { - path = "swagger.html".to_owned(); + } else if !path.contains('.') && WebAssets::get(&format!("{}.html", path)).is_some() { + path += ".html" } WebStaticFile(path) }