File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -783,7 +783,7 @@ Resources:
783
783
CachedMethods :
784
784
- GET
785
785
- HEAD
786
- CachePolicyId : 4135ea2d-6df8-44a3-9df3-4b5a84be39ad # caching disabled
786
+ CachePolicyId : !Ref CloudfrontNoCachePolicy # caching disabled
787
787
OriginRequestPolicyId : 216adef6-5c7f-47e4-b989-5492eafa07d3
788
788
Compress : true
789
789
ViewerCertificate :
@@ -808,6 +808,25 @@ Resources:
808
808
Action : s3:GetObject
809
809
Resource : !Sub "${AppFrontendS3Bucket.Arn}/*"
810
810
811
+ CloudfrontNoCachePolicy :
812
+ Type : AWS::CloudFront::CachePolicy
813
+ Properties :
814
+ CachePolicyConfig :
815
+ Comment : Cache policy with caching disabled and Gzip/Brotli enabled
816
+ DefaultTTL : 0
817
+ MaxTTL : 1
818
+ MinTTL : 0
819
+ Name : NoCache-GzipBrotli-Enabled
820
+ ParametersInCacheKeyAndForwardedToOrigin :
821
+ CookiesConfig :
822
+ CookieBehavior : none
823
+ EnableAcceptEncodingBrotli : true
824
+ EnableAcceptEncodingGzip : true
825
+ HeadersConfig :
826
+ HeaderBehavior : none
827
+ QueryStringsConfig :
828
+ QueryStringBehavior : none
829
+
811
830
CloudfrontCachePolicy :
812
831
Type : AWS::CloudFront::CachePolicy
813
832
Properties :
You can’t perform that action at this time.
0 commit comments