mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-20 00:51:07 +02:00
fixed another hardcoded prefix value
This commit is contained in:
@@ -34,10 +34,11 @@ function setupPluginSourceMapping(app) {
|
||||
development mode (`./nodebb dev`)
|
||||
*/
|
||||
var routes = plugins.clientScripts,
|
||||
mapping;
|
||||
mapping,
|
||||
prefix = __dirname.split(path.sep).length - 1;
|
||||
|
||||
routes.forEach(function(route) {
|
||||
mapping = '/' + route.split('/').slice(7).join('/');
|
||||
mapping = '/' + route.split('/').slice(prefix).join('/');
|
||||
app.get(mapping, function(req, res) {
|
||||
res.type('text/javascript').sendfile(route);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user