middlewares / encoder

PSR-15 middleware to encode the response body to gzip or deflate
MIT License
6 stars 2 forks source link

Dont compress assets that are already compressed. #3

Closed cseufert closed 4 years ago

cseufert commented 4 years ago

It appears that this middleware will re-compress images, zip files, woff fonts, and more. It should check the response content type is text/*, application/json, image/svg+xml etc, so it is only compressing items that benefit from the compression.

cseufert commented 4 years ago

4 This should improve the library.

oscarotero commented 4 years ago

New version released with your changes. Thanks!