Skip to content

Commit

Permalink
support both dot region and dash region s3 website endpoints (widdix#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
spohnan authored and michaelwittig committed Jul 31, 2017
1 parent 76b3779 commit 3289321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static-website/static-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Resources:
- !Ref DomainName
Comment: !Ref DomainName
Origins:
- DomainName: !Sub '${S3Bucket}.s3-website-${AWS::Region}.amazonaws.com'
- DomainName: !Select [ 2, !Split [ /, !GetAtt S3Bucket.WebsiteURL ] ]
Id: s3origin
CustomOriginConfig:
OriginProtocolPolicy: 'http-only'
Expand Down Expand Up @@ -140,7 +140,7 @@ Resources:
- !Ref RedirectDomainName
Comment: !Ref RedirectDomainName
Origins:
- DomainName: !Sub '${S3BucketRedirect}.s3-website-${AWS::Region}.amazonaws.com'
- DomainName: !Select [ 2, !Split [ /, !GetAtt S3BucketRedirect.WebsiteURL ] ]
Id: s3origin
CustomOriginConfig:
OriginProtocolPolicy: 'http-only'
Expand Down

0 comments on commit 3289321

Please sign in to comment.