Alireza Valizade Alireza Valizade - 1 year ago 165
Node.js Question

compression gzip not working (expressjs - compression library)

I use from compression library and still not working..
this is my config :

const app = express();


app.use("/public", express.static(path.join(path.resolve(__dirname, '../../public'))));

enter image description here

Answer Source

according to this link 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.

  filter: function () { return true; }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download