refactor(feeder): update static file serving for split web dirs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
caoqianming 2026-04-17 08:21:17 +08:00
parent 9bbbb82459
commit f9f9915012
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ pub fn build_router(state: AppState) -> Router {
.nest( .nest(
"/ui", "/ui",
Router::new() Router::new()
.fallback_service(ServeDir::new("web").append_index_html_on_directories(true)) .fallback_service(
ServeDir::new("web/feeder")
.append_index_html_on_directories(true)
.fallback(ServeDir::new("web/core")),
)
.layer(axum::middleware::from_fn(no_cache)), .layer(axum::middleware::from_fn(no_cache)),
) )
.route("/ws/public", get(websocket::public_websocket_handler)) .route("/ws/public", get(websocket::public_websocket_handler))