Merge pull request #84 from andersk/404

Serve 404 page with status code 404, not 200
master
Zach Leatherman 2021-03-17 10:05:48 -05:00 committed by GitHub
commit 999e35c2d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
});