Skip to content

Commit

Permalink
Disabling gzip compression in cloudfront's cache option. This will im…
Browse files Browse the repository at this point in the history
…prove cloudfront's cache hit ratio.
  • Loading branch information
fvsnippets authored and Federico Valido committed Oct 8, 2023
1 parent 29fe1e7 commit 1abf830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/constructs/lib/back-end/back-end-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class BackEnd extends Construct {
defaultTtl: Duration.days(1),
minTtl: Duration.seconds(1),
maxTtl: Duration.days(365),
enableAcceptEncodingGzip: true,
enableAcceptEncodingGzip: false,
headerBehavior: CacheHeaderBehavior.allowList("origin", "accept"),
queryStringBehavior: CacheQueryStringBehavior.allowList("signature"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = `
"CookieBehavior": "none",
},
"EnableAcceptEncodingBrotli": false,
"EnableAcceptEncodingGzip": true,
"EnableAcceptEncodingGzip": false,
"HeadersConfig": {
"HeaderBehavior": "whitelist",
"Headers": [
Expand Down

0 comments on commit 1abf830

Please sign in to comment.