fix: Set 404 HTTP status on the not found page

This commit is contained in:
Audun Halland 2024-04-08 01:09:01 +02:00
parent 3f4475c3da
commit 1d5f1f0592
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ async fn serve(
"/", "/",
ServeDir::new(build_dir.clone()) ServeDir::new(build_dir.clone())
// The fallback route for 404 errors: // 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); .with_state(reload_tx);