diff --git a/packages/backend/src/main.rs b/packages/backend/src/main.rs index df19ec0..a2cabc4 100644 --- a/packages/backend/src/main.rs +++ b/packages/backend/src/main.rs @@ -42,9 +42,6 @@ async fn main() { let api_routes = Router::new().nest("/v3", v3_routes); let index = format!("{}{}", config::FRONTEND_PATH.to_string(), "/index.html"); - // SPA fallback: serve `index.html` for client side routes. - // `fallback` instead of `not_found_service`, as the latter forces a `404` status code, - // while the document itself is served successfully. A missing note is signalled by the API. let serve_dir = ServeDir::new(config::FRONTEND_PATH.to_string()).fallback(ServeFile::new(index)); let app = Router::new() @@ -69,4 +66,4 @@ async fn main() { axum::serve(listener, ServiceExt::::into_make_service(app)) .await .unwrap(); -} \ No newline at end of file +}