Release 2.8.0
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// Forward unmatched requests to the shared error-page handler.
|
||||
|
||||
module.exports = function registerNotFoundHandler(app) {
|
||||
app.use(function (_req, _res, next) {
|
||||
const error = new Error('Page not found.');
|
||||
error.statusCode = 404;
|
||||
next(error);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user