Closed alirezavalizade closed 8 years ago
By default, this module does not compress responses that contain already compressed assets, like JPEG images. You can use the filter option to override this behavior if you like.
@dougwilson can you show me How?
Unfortunately I am on a phone, and it's impractical to type code here. You can see the documentation for filter at https://github.com/expressjs/compression/blob/master/README.md#filter and there is a filter override example in the readme as well. If you want to simply compress all types, just return false in the function.
just return false in the function.
I meant to type return true.
Hi @alirezavalizade I'm not sure I understand.
app.use(compression({
filter: function () { return true; }
}));
I use from compression library and still not working.. this is my config :