Skip to content

Commit

Permalink
fix #317
Browse files Browse the repository at this point in the history
  • Loading branch information
nswbmw committed Mar 4, 2017
1 parent 39f15fb commit 4ccefef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion book/4.11 404 页面.md
Expand Up @@ -18,7 +18,7 @@ app.use('/posts', require('./posts'));
// 404 page
app.use(function (req, res) {
if (!res.headersSent) {
res.render('404');
res.status(404).render('404');
}
});
```
Expand Down
2 changes: 1 addition & 1 deletion routes/index.js
Expand Up @@ -10,7 +10,7 @@ module.exports = function (app) {
// 404 page
app.use(function (req, res) {
if (!res.headersSent) {
res.render('404');
res.status(404).render('404');
}
});
};

0 comments on commit 4ccefef

Please sign in to comment.