mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
setting cache headers to 0 on development mode
This commit is contained in:
@@ -31,7 +31,9 @@ var nconf = require('nconf'),
|
||||
var fullPath = path.join(Plugins.staticDirs[req.params.id], relPath);
|
||||
fs.exists(fullPath, function(exists) {
|
||||
if (exists) {
|
||||
res.sendfile(fullPath);
|
||||
res.sendfile(fullPath, {
|
||||
maxAge: app.enabled('cache') ? 5184000000 : 0
|
||||
});
|
||||
} else {
|
||||
res.redirect('/404');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user