Serve 404 page with status code 404, not 200
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
89e242c329
commit
7af708e8ac
@ -89,6 +89,7 @@ module.exports = function(eleventyConfig) {
|
||||
|
||||
browserSync.addMiddleware("*", (req, res) => {
|
||||
// Provides the 404 content without redirect.
|
||||
res.writeHead(404, {"Content-Type": "text/html; charset=UTF-8"});
|
||||
res.write(content_404);
|
||||
res.end();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user