mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
Return 404 status on a 404 page. Fixed #33
This commit is contained in:
parent
1db2daa01a
commit
81d30c2925
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());
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user