mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
fixed plugin css files for relative path
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user