Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit a38e08c

Browse files
committed
using custom origin that points to s3 website url instead of s3 origin
1 parent 0ac7a09 commit a38e08c

File tree

3 files changed

+17
-655
lines changed

3 files changed

+17
-655
lines changed

awscdk/awscdk/cloudfront.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ def __init__(
7070
],
7171
),
7272
cloudfront.SourceConfiguration(
73-
s3_origin_source=cloudfront.S3OriginConfig(
74-
s3_bucket_source=self.static_site_bucket
73+
custom_origin_source=cloudfront.CustomOriginConfig(
74+
domain_name=self.static_site_bucket.bucket_website_url,
75+
origin_protocol_policy=cloudfront.OriginProtocolPolicy.MATCH_VIEWER, # noqa
7576
),
7677
behaviors=[
7778
cloudfront.Behavior(

0 commit comments

Comments
 (0)