fixed plugin css files for relative path

This commit is contained in:
Baris Soner Usakli
2014-01-06 23:44:32 -05:00
parent faf5ea2122
commit d6333a3969
3 changed files with 6 additions and 2 deletions

View File

@@ -26,9 +26,12 @@ var nconf = require('nconf'),
// Static Assets
app.get('/plugins/:id/*', function(req, res) {
var relPath = req._parsedUrl.pathname.replace('/plugins/' + req.params.id, '');
var relPath = req._parsedUrl.pathname.replace(nconf.get('relative_path') + '/plugins/' + req.params.id, '');
if (plugins.staticDirs[req.params.id]) {
var fullPath = path.join(plugins.staticDirs[req.params.id], relPath);
fs.exists(fullPath, function(exists) {
if (exists) {
res.sendfile(fullPath, {