From 82770a5ff07e3d3cecef7d69939055e70dcc7bd1 Mon Sep 17 00:00:00 2001 From: kaysond Date: Tue, 30 Nov 2021 11:16:54 -0800 Subject: [PATCH] restore comment --- server/src/infra/tcp_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/infra/tcp_server.rs b/server/src/infra/tcp_server.rs index d1424ac..e259d96 100644 --- a/server/src/infra/tcp_server.rs +++ b/server/src/infra/tcp_server.rs @@ -74,10 +74,10 @@ fn http_config( .service(Files::new("/static", "./app/static")) // Serve static fonts .service(Files::new("/static/fonts", "./app/static/fonts")) - // Serve the index + // Default to serve index.html for unknown routes, to support routing. .service( web::scope("/") - .route("", web::get().to(index)) + .route("", web::get().to(index)) // this is necessary because the below doesn't match a request for "/" .route(".*", web::get().to(index)), ); }