mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-11-09 20:50:59 +01:00
Use cache for minified assets.
This commit is contained in:
parent
6a7a3ea3ab
commit
98f56b53b4
@ -142,10 +142,13 @@ async.waterfall([
|
||||
gracefulShutdown();
|
||||
});
|
||||
|
||||
//serve static files
|
||||
// Cache both minified and static.
|
||||
var assetCache = new CachingMiddleware;
|
||||
app.all('/static/:filename(*)', assetCache.handle, minify.minify);
|
||||
|
||||
app.all('/(minified|static)/*', assetCache.handle);
|
||||
|
||||
//serve static files
|
||||
app.all('/static/:filename(*)', minify.minify);
|
||||
|
||||
//serve minified files
|
||||
var jsServer = new (Yajsml.Server)({
|
||||
rootPath: 'minified/'
|
||||
@ -156,8 +159,6 @@ async.waterfall([
|
||||
Yajsml.associators.associationsForSimpleMapping(minify.tar);
|
||||
var associator = new StaticAssociator(associations);
|
||||
jsServer.setAssociator(associator);
|
||||
var assetCache_other = new CachingMiddleware;
|
||||
app.all('/minified/:filename', assetCache_other.handle);
|
||||
app.use(jsServer);
|
||||
|
||||
//checks for padAccess
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user