SailsJS enable compression (gzip compress)

Here’s what I did to enable gzip compression.

npm install compression

In the ./config/http.js, add the following code.

middleware: {
compress: require('compression')(),

Note this will universally enable gzip compression.

1 thought on “SailsJS enable compression (gzip compress)

Leave a Reply

Your email address will not be published. Required fields are marked *