diff --git a/src/main.rs b/src/main.rs index 1ca0d94..b90a9ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -394,12 +394,10 @@ async fn async_p404() -> Result { p404() } -#[get("/tacit-css.min.css")] fn css() -> HttpResponse { HttpResponse::Ok().content_type("text/css").body(CSS) } -#[get("/favicon.ico")] fn favicon32() -> HttpResponse { HttpResponse::Ok().content_type("image/png").body(FAVICON) } @@ -414,10 +412,11 @@ async fn start_server() -> std::io::Result<()> { App::new() .data(state.clone()) .wrap(middleware::Logger::default()) - .wrap(middleware::NormalizePath::default()) + // .wrap(middleware::NormalizePath::default()) .service(index) - .service(css) - .service(favicon32) + .service(web::resource("/tacit-css.min.css").route(web::get().to(css))) + // TODO + .service(web::resource("/favicon.ico").route(web::get().to(favicon32))) .service(generate) .service(web::resource("/github/{user}/{repo}").to(calculate_hoc::)) .service(web::resource("/gitlab/{user}/{repo}").to(calculate_hoc::))