mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8144 pluginHooks in maintenance mode middleware
This commit is contained in:
@@ -11,6 +11,9 @@ module.exports = function (middleware) {
|
|||||||
return setImmediate(next);
|
return setImmediate(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hooksAsync = util.promisify(middleware.pluginHooks);
|
||||||
|
await hooksAsync(req, res);
|
||||||
|
|
||||||
const url = req.url.replace(nconf.get('relative_path'), '');
|
const url = req.url.replace(nconf.get('relative_path'), '');
|
||||||
if (url.startsWith('/login') || url.startsWith('/api/login')) {
|
if (url.startsWith('/login') || url.startsWith('/api/login')) {
|
||||||
return setImmediate(next);
|
return setImmediate(next);
|
||||||
|
|||||||
Reference in New Issue
Block a user