Skip to content

Commit

Permalink
Even though AWS offers a configuration option to set the CloudFront o…
Browse files Browse the repository at this point in the history
…rigin as an S3 bucket, it comes out as a redirect thing that's not the static site. So, I'm putting this back to a custom origin configuration, which restores the ability to publish new distributions and sites. (#114)
  • Loading branch information
freeformflow authored Nov 12, 2017
1 parent 133bfc4 commit c09f5a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haiku9",
"version": "1.1.2",
"version": "1.1.3",
"description": "Asset compilation, static-site generator",
"main": "lib/index.js",
"files": [
Expand Down
14 changes: 11 additions & 3 deletions src/publish/bucket/cloudfront/distribution.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ module.exports = async (config, cf) ->


set = async (name) ->
buildSource = (name) -> name + ".s3.amazonaws.com"
buildSource = (name) ->
name + ".s3-website-" + config.aws.region + ".amazonaws.com"

setViewerCertificate = async ->
{ssl, protocol} = config.aws.cache
Expand Down Expand Up @@ -77,8 +78,15 @@ module.exports = async (config, cf) ->
Quantity: 0
Items: []
OriginPath: ""
S3OriginConfig:
OriginAccessIdentity: ""
CustomOriginConfig:
HTTPPort: 80
HTTPSPort: 443
OriginProtocolPolicy: "http-only"
OriginSslProtocols:
Quantity: 1
Items: ["TLSv1.2"]
OriginReadTimeout: 30
OriginKeepaliveTimeout: 5
]


Expand Down

0 comments on commit c09f5a7

Please sign in to comment.