Skip to content

Commit

Permalink
fix: #8144 pluginHooks in maintenance mode middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Feb 6, 2020
1 parent 146388a commit 0885ec6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/middleware/maintenance.js
Expand Up @@ -11,6 +11,9 @@ module.exports = function (middleware) {
return setImmediate(next);
}

const hooksAsync = util.promisify(middleware.pluginHooks);
await hooksAsync(req, res);

const url = req.url.replace(nconf.get('relative_path'), '');
if (url.startsWith('/login') || url.startsWith('/api/login')) {
return setImmediate(next);
Expand Down

0 comments on commit 0885ec6

Please sign in to comment.