From 80c8a3e8a8c295f30da2eec1f27313cba1dc8ff5 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 8 Nov 2024 13:04:56 -0600 Subject: [PATCH] fix the api not working --- src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index cfe8c73..ade8e4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,9 +29,7 @@ impl RootSpanBuilder for DomainRootSpanBuilder { let info = request.connection_info(); let ip = info.realip_remote_addr().expect("hi"); let location = request.path(); - if location.ends_with("/") { - info!(?method, ip, location); - } + info!(?method, ip, location); tracing_actix_web::root_span!(request) // let client_id: &str = todo!("Somehow extract it from the authorization header"); @@ -82,7 +80,6 @@ async fn main() -> std::io::Result<()> { App::new() .wrap(TracingLogger::::new()) .app_data(TempFileConfig::default().directory("./tmp")) - .service(Files::new("/", "./public").index_file("index.html")) .service(mt_form) .service(health_form) .service(parent_form) @@ -90,8 +87,9 @@ async fn main() -> std::io::Result<()> { .service(church_form) .service(local_form) .service(camp_form) + .service(Files::new("/", "./public").index_file("index.html")) }) - .bind(("127.0.0.1", 4242))? + .bind(("localhost", 4242))? .workers(2) .run() .await