mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Minify serves all static assets.
This commit is contained in:
parent
df9e29087f
commit
e0930005c3
2 changed files with 47 additions and 30 deletions
|
@ -144,13 +144,7 @@ async.waterfall([
|
|||
|
||||
//serve static files
|
||||
var assetCache = new CachingMiddleware;
|
||||
app.all('/static/js/:filename', assetCache.handle, minify.minifyJS);
|
||||
app.get('/static/*', function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/.." +
|
||||
req.url.replace(/\.\./g, '').split("?")[0]);
|
||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||
});
|
||||
app.all('/static/:filename(*)', assetCache.handle, minify.minify);
|
||||
|
||||
//serve minified files
|
||||
var jsServer = new (Yajsml.Server)({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue