Fixing issue where the relative path was ignored for express modules (#4621)

* Fixing issue where the relative path was ignored for express modules

* Fixing issue where the relative path was ignored for express modules (without the console log lines!)
v1.18.x
AdJones 9 years ago committed by Julian Lam
parent f0c9623878
commit 693e724802

@ -92,7 +92,9 @@ module.exports = function(Meta) {
// Add routes for AMD-type modules to serve those files
var numBridged = 0,
addRoute = function(relPath) {
app.get('/src/modules/' + relPath, function(req, res) {
var relativePath = nconf.get('relative_path');
app.get(relativePath + '/src/modules/' + relPath, function(req, res) {
return res.sendFile(path.join(__dirname, '../../', Meta.js.scripts.modules[relPath]), {
maxAge: app.enabled('cache') ? 5184000000 : 0
});

Loading…
Cancel
Save