From 1d5f1f05929caf8c16d7691953dd19c7cf523a87 Mon Sep 17 00:00:00 2001 From: Audun Halland Date: Mon, 8 Apr 2024 01:09:01 +0200 Subject: [PATCH] fix: Set 404 HTTP status on the not found page --- src/cmd/serve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 701a255b..1c712a9a 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -138,7 +138,7 @@ async fn serve( "/", ServeDir::new(build_dir.clone()) // The fallback route for 404 errors: - .fallback(ServeFile::new(build_dir.join(file_404))), + .not_found_service(ServeFile::new(build_dir.join(file_404))), ) .with_state(reload_tx);