Serve 404 page with status code 404, not 200

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
master
Anders Kaseorg 2020-12-21 22:01:18 -08:00
parent 89e242c329
commit 7af708e8ac
1 changed files with 1 additions and 0 deletions

View File

@ -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();
});