make the regex more clear

This commit is contained in:
webzwo0i 2020-11-21 01:48:43 +01:00
parent a11f5c1378
commit 0dbec84794

View file

@ -196,7 +196,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 && /^application\/javascript/.test(headers['content-type'])) { if (supportsGzip && /application\/javascript/.test(headers['content-type'])) {
pathStr = pathStr + '.gz'; pathStr = pathStr + '.gz';
headers['content-encoding'] = 'gzip'; headers['content-encoding'] = 'gzip';
} }