mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
improved minifying
This commit is contained in:
parent
ba677c6e30
commit
e9a389b0a6
3 changed files with 15 additions and 29 deletions
|
@ -85,20 +85,6 @@ async.waterfall([
|
|||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||
});
|
||||
|
||||
//if minified is disabled, we need to server the static files under /p/static too
|
||||
//it looks like dynamic script loading works only for subfolders, thats the reason we're doing this
|
||||
if(settings.minify == false)
|
||||
{
|
||||
//serve static files
|
||||
app.get('/p/static/*', function(req, res)
|
||||
{
|
||||
res.header("Server", serverName);
|
||||
var filePath = path.normalize(__dirname + "/.." + req.url.split("?")[0].replace("p/",""));
|
||||
console.error(filePath);
|
||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||
});
|
||||
}
|
||||
|
||||
//serve minified files
|
||||
app.get('/minified/:id', function(req, res)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue