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

Commit 25c2996

Browse files
committed
using regional website for s3 bucket instead of bucket website domain name
1 parent 2fd5cf7 commit 25c2996

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

awscdk/awscdk/cloudfront.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ def __init__(
5454
cloudfront.SourceConfiguration(
5555
custom_origin_source=cloudfront.CustomOriginConfig(
5656
domain_name=alb,
57-
origin_protocol_policy=cloudfront.OriginProtocolPolicy.MATCH_VIEWER, # noqa
57+
origin_protocol_policy=cloudfront.OriginProtocolPolicy.MATCH_VIEWER,
5858
),
5959
behaviors=[
6060
cloudfront.Behavior(
61-
allowed_methods=cloudfront.CloudFrontAllowedMethods.ALL, # noqa
61+
allowed_methods=cloudfront.CloudFrontAllowedMethods.ALL,
6262
path_pattern=path_pattern,
6363
forwarded_values={
6464
"headers": ["*"],
@@ -71,13 +71,13 @@ def __init__(
7171
),
7272
cloudfront.SourceConfiguration(
7373
custom_origin_source=cloudfront.CustomOriginConfig(
74-
domain_name=self.static_site_bucket.bucket_domain_name,
75-
origin_protocol_policy=cloudfront.OriginProtocolPolicy.MATCH_VIEWER, # noqa
74+
domain_name=self.static_site_bucket.bucket_regional_domain_name,
75+
origin_protocol_policy=cloudfront.OriginProtocolPolicy.MATCH_VIEWER,
7676
),
7777
behaviors=[
7878
cloudfront.Behavior(
7979
is_default_behavior=True,
80-
cached_methods=cloudfront.CloudFrontAllowedMethods.GET_HEAD, # noqa
80+
cached_methods=cloudfront.CloudFrontAllowedMethods.GET_HEAD,
8181
)
8282
],
8383
),

awscdk/stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ Resources:
483483
DomainName:
484484
Fn::GetAtt:
485485
- StaticSiteStaticSiteBucket442CE34F
486-
- DomainName
486+
- RegionalDomainName
487487
Id: origin2
488488
PriceClass: PriceClass_100
489489
ViewerCertificate:

0 commit comments

Comments
 (0)