Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bjohansebas committed Sep 28, 2024
1 parent 5d6a827 commit 24609a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function compression (options) {
}

// if no method is found, use the default encoding
if (encodingSupported.indexOf(defaultEncoding) !== -1 && req.headers['accept-encoding'].split(',')[0] === '') {
if (encodingSupported.indexOf(defaultEncoding) !== -1 && !req.headers['accept-encoding']) {
method = defaultEncoding === '*' ? 'gzip' : defaultEncoding
}

Expand Down

0 comments on commit 24609a6

Please sign in to comment.