Skip to content

Commit

Permalink
fix: fixed missing options.compression check for identity
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Jun 21, 2020
1 parent 8f3e343 commit 386cd93
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 @@ -138,7 +138,7 @@ module.exports = function(options) {
}
}

if (!ctx.response.get('Content-Encoding'))
if (options.compression && !ctx.response.get('Content-Encoding'))
ctx.response.set('Content-Encoding', 'identity');

await set(ctx.cashKey, obj, ctx.cash.maxAge || options.maxAge || 0);
Expand Down

0 comments on commit 386cd93

Please sign in to comment.