From 7af708e8ac81c5688b23d4e11028ac3b76c8302e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 21 Dec 2020 22:01:18 -0800 Subject: [PATCH] Serve 404 page with status code 404, not 200 Signed-off-by: Anders Kaseorg --- .eleventy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eleventy.js b/.eleventy.js index d48d7ac..b2f39d6 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -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(); });