mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
fix breadcrumbs and home /api route not loading
This commit is contained in:
@@ -37,7 +37,7 @@ pubsub.on('config:update', configUpdated);
|
||||
configUpdated();
|
||||
|
||||
module.exports = function (req, res, next) {
|
||||
if (req.path !== '/' && req.path !== '/api/') {
|
||||
if (req.path !== '/' && req.path !== '/api/' && req.path !== '/api') {
|
||||
return next();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ module.exports = function (req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
req.url = req.path + route;
|
||||
req.url = req.path + (!req.path.endsWith('/') ? '/' : '') + route;
|
||||
next();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user