Skip to content

Commit

Permalink
fix: Set 404 HTTP status on the not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
audunhalland committed Apr 7, 2024
1 parent 3f4475c commit 1d5f1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1d5f1f0

Please sign in to comment.