Skip to content

Commit

Permalink
zlib deprecation prevention (#119)
Browse files Browse the repository at this point in the history
Access Z_SYNC_FLUSH is still possible but deprecated. Prevented this deprecation by accessing Z_SYNC_FLUSH from constants namespace.
  • Loading branch information
Leafgard authored Jul 6, 2020
1 parent 23f0eba commit 22c434c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ app.use(compress({
},
threshold: 2048,
gzip: {
flush: require('zlib').Z_SYNC_FLUSH
flush: require('zlib').constants.Z_SYNC_FLUSH
},
deflate: {
flush: require('zlib').Z_SYNC_FLUSH,
flush: require('zlib').constants.Z_SYNC_FLUSH,
},
br: false // disable brotli
}))
Expand Down

0 comments on commit 22c434c

Please sign in to comment.