From 81d30c2925d7fbb6481cf314a6903406b459edce Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Sun, 2 Feb 2014 06:11:22 -0500 Subject: [PATCH] Return 404 status on a 404 page. Fixed #33 --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index fdeef2d959..229f85f9d7 100755 --- a/app.js +++ b/app.js @@ -83,7 +83,8 @@ app.use(less({ src: __dirname + '/public', compress: true })); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'), { maxAge: week })); app.use(function(req, res) { - res.render('404', { status: 404 }); + res.status(404); + res.render('404'); }); app.use(express.errorHandler());