ghost-storage-adapter-s3
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -59,2 +59,3 @@ 'use strict'; | ||
var secretAccessKey = config.secretAccessKey; | ||
var assetHost = config.assetHost; | ||
@@ -64,3 +65,3 @@ | ||
_this.bucket = bucket; | ||
_this.host = 'https://s3' + (region === 'us-east-1' ? '' : '-' + region) + '.amazonaws.com/' + bucket; | ||
_this.host = assetHost ? assetHost : 'https://s3' + (region === 'us-east-1' ? '' : '-' + region) + '.amazonaws.com/' + bucket; | ||
_this.region = region; | ||
@@ -67,0 +68,0 @@ _this.secretAccessKey = secretAccessKey; |
@@ -60,3 +60,3 @@ { | ||
}, | ||
"version": "1.0.1" | ||
"version": "1.1.0" | ||
} |
@@ -23,2 +23,3 @@ # Ghost storage adapter S3 | ||
secretAccessKey: 'YOUR_SECRET_ACCESS_KEY', | ||
assetHost: 'OPTIONAL_CDN_URL' | ||
}, | ||
@@ -25,0 +26,0 @@ }, |
@@ -17,7 +17,7 @@ import AWS from 'aws-sdk'; | ||
const { accessKeyId, bucket, region, secretAccessKey } = config; | ||
const { accessKeyId, bucket, region, secretAccessKey, assetHost } = config; | ||
this.accessKeyId = accessKeyId; | ||
this.bucket = bucket; | ||
this.host = `https://s3${ region === 'us-east-1' ? '' : `-${ region }` }.amazonaws.com/${ bucket }`; | ||
this.host = assetHost ? assetHost : `https://s3${ region === 'us-east-1' ? '' : `-${ region }` }.amazonaws.com/${ bucket }`; | ||
this.region = region; | ||
@@ -24,0 +24,0 @@ this.secretAccessKey = secretAccessKey; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12634
206
31