mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
Return 404 status on a 404 page. Fixed #33
This commit is contained in:
@@ -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