Return 404 status on a 404 page. Fixed #33
This commit is contained in:
3
app.js
3
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());
|
||||
|
||||
|
Reference in New Issue
Block a user