Skip to content

Commit 1d5f1f0

Browse files
committed
fix: Set 404 HTTP status on the not found page
1 parent 3f4475c commit 1d5f1f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/serve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ async fn serve(
138138
"/",
139139
ServeDir::new(build_dir.clone())
140140
// The fallback route for 404 errors:
141-
.fallback(ServeFile::new(build_dir.join(file_404))),
141+
.not_found_service(ServeFile::new(build_dir.join(file_404))),
142142
)
143143
.with_state(reload_tx);
144144

0 commit comments

Comments
 (0)