(req)
| 42 | |
| 43 | // Check to see if we should try to compress a file with gzip. |
| 44 | function shouldCompressGzip(req) { |
| 45 | const headers = req.headers; |
| 46 | |
| 47 | return headers && headers['accept-encoding'] && |
| 48 | headers['accept-encoding'] |
| 49 | .split(',') |
| 50 | .some(el => ['*', 'compress', 'gzip', 'deflate'].indexOf(el.trim()) !== -1) |
| 51 | ; |
| 52 | } |
| 53 | |
| 54 | function shouldCompressBrotli(req) { |
| 55 | const headers = req.headers; |
no outgoing calls
no test coverage detected
searching dependent graphs…