mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Only gzip text files.
It is not very productive to compress images so compress text only.
This commit is contained in:
parent
aac849f6ea
commit
df9e29087f
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ CachingMiddleware.prototype = new function () {
|
||||||
var statusCode = responseCache[cacheKey].statusCode;
|
var statusCode = responseCache[cacheKey].statusCode;
|
||||||
|
|
||||||
var pathStr = CACHE_DIR + 'minified_' + cacheKey;
|
var pathStr = CACHE_DIR + 'minified_' + cacheKey;
|
||||||
if (supportsGzip) {
|
if (supportsGzip && (headers['content-type'] || '').match(/^text\//)) {
|
||||||
pathStr = pathStr + '.gz';
|
pathStr = pathStr + '.gz';
|
||||||
headers['content-encoding'] = 'gzip';
|
headers['content-encoding'] = 'gzip';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue