diff --git a/lib/middlewares/pre_compressed.js b/lib/middlewares/pre_compressed.js index 89140db..a9dfbd2 100644 --- a/lib/middlewares/pre_compressed.js +++ b/lib/middlewares/pre_compressed.js @@ -31,7 +31,7 @@ module.exports = function(app) { if (!vary) { res.setHeader('Vary', 'Accept-Encoding'); - } else if (!~vary.indexOf('Accept-Encoding')) { + } else if (!vary.includes('Accept-Encoding')) { res.setHeader('Vary', vary + ', Accept-Encoding'); }