mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
updated regex to match admin route with no trailing slash
This commit is contained in:
@@ -163,8 +163,7 @@ module.exports = function(app, middleware) {
|
||||
|
||||
app.all(relativePath + '/api/?*', middleware.updateLastOnlineTime, middleware.prepareAPI);
|
||||
app.all(relativePath + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);
|
||||
app.all(relativePath + '/admin/*', middleware.admin.isAdmin);
|
||||
app.get(relativePath + '/admin', middleware.admin.isAdmin);
|
||||
app.all(relativePath + '/admin/?*', middleware.admin.isAdmin);
|
||||
|
||||
adminRoutes(router, middleware, controllers);
|
||||
metaRoutes(router, middleware, controllers);
|
||||
@@ -202,9 +201,9 @@ module.exports = function(app, middleware) {
|
||||
plugins.reloadRoutes();
|
||||
// plugins.ready(function() {
|
||||
// plugins.fireHook('static:app.load', pluginRouter, middleware, controllers, function() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// });
|
||||
// });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user