Skip to content

Commit 1abf830

Browse files
fvsnippetsFederico Valido
authored and
Federico Valido
committed
Disabling gzip compression in cloudfront's cache option. This will improve cloudfront's cache hit ratio.
1 parent 29fe1e7 commit 1abf830

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/constructs/lib/back-end/back-end-construct.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class BackEnd extends Construct {
140140
defaultTtl: Duration.days(1),
141141
minTtl: Duration.seconds(1),
142142
maxTtl: Duration.days(365),
143-
enableAcceptEncodingGzip: true,
143+
enableAcceptEncodingGzip: false,
144144
headerBehavior: CacheHeaderBehavior.allowList("origin", "accept"),
145145
queryStringBehavior: CacheQueryStringBehavior.allowList("signature"),
146146
});

source/constructs/test/__snapshots__/constructs.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = `
395395
"CookieBehavior": "none",
396396
},
397397
"EnableAcceptEncodingBrotli": false,
398-
"EnableAcceptEncodingGzip": true,
398+
"EnableAcceptEncodingGzip": false,
399399
"HeadersConfig": {
400400
"HeaderBehavior": "whitelist",
401401
"Headers": [

0 commit comments

Comments
 (0)