| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| method = accept.encoding(['gzip', 'identity']) | ||
| } | ||
| var negotiator = new Negotiator(req) | ||
| var method = negotiator.encoding(['gzip', 'deflate', 'identity'], ['gzip']) |
There was a problem hiding this comment.
When you add brotli, just add it here:
| var method = negotiator.encoding(['gzip', 'deflate', 'identity'], ['gzip']) | |
| var method = negotiator.encoding(hasBrotli ? ['br', 'gzip', 'deflate', 'identity'] : ['gzip', 'deflate', 'identity'], hasBrotli ? ['br', 'gzip'] : ['gzip']) |
Edit: Could be better to store in global vars, e.g.
var SUPPORTED_ENCODING = hasBrotli ? ['br', 'gzip', 'deflate', 'identity'] : ['gzip', 'deflate', 'identity'];
var PREFERRED_ENCODING = hasBrotli ? ['br', 'gzip'] : ['gzip'];
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Follow up to #194 (comment).