Skip to content

Commit 5fbe163

Browse files
committed
fix cloudfront CORS headers
1 parent 754e019 commit 5fbe163

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

cloudformation/main.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -633,14 +633,8 @@ Resources:
633633
CachedMethods:
634634
- GET
635635
- HEAD
636-
ForwardedValues:
637-
QueryString: true
638-
QueryStringCacheKeys:
639-
- host
640-
- ts
641-
- upcomingOnly
642-
Cookies:
643-
Forward: none
636+
CachePolicyId: 4cc15a8a-d715-48a4-82b8-cc0b614638fe # use origin headers
637+
OriginRequestPolicyId: b689b0a8-53d0-40ab-baf2-68738e2966ac # all except host - normally, you want to pass the host header but our setup is weird
644638
- PathPattern: "/api/v1/events/*"
645639
TargetOriginId: ApiGatewayOrigin
646640
ViewerProtocolPolicy: redirect-to-https
@@ -655,14 +649,8 @@ Resources:
655649
CachedMethods:
656650
- GET
657651
- HEAD
658-
ForwardedValues:
659-
QueryString: true
660-
QueryStringCacheKeys:
661-
- host
662-
- ts
663-
- upcomingOnly
664-
Cookies:
665-
Forward: none
652+
CachePolicyId: 4cc15a8a-d715-48a4-82b8-cc0b614638fe # use origin headers
653+
OriginRequestPolicyId: b689b0a8-53d0-40ab-baf2-68738e2966ac # all except host - normally, you want to pass the host header but our setup is weird
666654
- PathPattern: "/api/*"
667655
TargetOriginId: ApiGatewayOrigin
668656
ViewerProtocolPolicy: redirect-to-https

0 commit comments

Comments
 (0)