fix: #8144 pluginHooks in maintenance mode middleware

v1.18.x
Julian Lam 5 years ago
parent 146388aac8
commit 0885ec6858

@ -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);

Loading…
Cancel
Save