Merge pull request #84 from andersk/404
Serve 404 page with status code 404, not 200
This commit is contained in:
commit
999e35c2d9
@ -89,6 +89,7 @@ module.exports = function(eleventyConfig) {
|
|||||||
|
|
||||||
browserSync.addMiddleware("*", (req, res) => {
|
browserSync.addMiddleware("*", (req, res) => {
|
||||||
// Provides the 404 content without redirect.
|
// Provides the 404 content without redirect.
|
||||||
|
res.writeHead(404, {"Content-Type": "text/html; charset=UTF-8"});
|
||||||
res.write(content_404);
|
res.write(content_404);
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user