Skip to content

Commit

Permalink
Removing CF cache policy
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltruong committed Jul 22, 2024
1 parent 129b4ff commit 22525f1
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ Resources:
CloudFrontOriginAccessIdentityConfig:
Comment: CloudFront access identity

CloudFrontAPICachePolicy:
Type: AWS::CloudFront::CachePolicy
Properties:
CachePolicyConfig:
Comment: "Custom CloudFront Caching Policy to allow the Authorization header through to the Origins."
DefaultTTL: 1
MaxTTL: 1
MinTTL: 1
Name: !Sub ${ApiGatewayId}-CFCachePolicy
ParametersInCacheKeyAndForwardedToOrigin:
CookiesConfig:
CookieBehavior: none
EnableAcceptEncodingBrotli: false
EnableAcceptEncodingGzip: false
HeadersConfig:
HeaderBehavior: whitelist
Headers:
- Authorization
- X-Api-Key
QueryStringsConfig:
QueryStringBehavior: all
# CloudFrontAPICachePolicy:
# Type: AWS::CloudFront::CachePolicy
# Properties:
# CachePolicyConfig:
# Comment: "Custom CloudFront Caching Policy to allow the Authorization header through to the Origins."
# DefaultTTL: 1
# MaxTTL: 1
# MinTTL: 1
# Name: !Sub ${ApiGatewayId}-CFCachePolicy
# ParametersInCacheKeyAndForwardedToOrigin:
# CookiesConfig:
# CookieBehavior: none
# EnableAcceptEncodingBrotli: false
# EnableAcceptEncodingGzip: false
# HeadersConfig:
# HeaderBehavior: whitelist
# Headers:
# - Authorization
# - X-Api-Key
# QueryStringsConfig:
# QueryStringBehavior: all

CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Expand Down

0 comments on commit 22525f1

Please sign in to comment.