Skip to content

Commit

Permalink
Merge pull request #29 from wdstar/catbox-s3-patch
Browse files Browse the repository at this point in the history
fix: add path-style URL switch flag for S3 strategy.
  • Loading branch information
tkyi authored Feb 13, 2018
2 parents d1ef510 + 4e1ec5b commit d4453f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/custom-environment-variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ strategy:
endpoint: S3_ENDPOINT
# Specific signature version for KMS encrypted objects
signatureVersion: S3_SIG_VER
# Whether to force path style URLs for S3 objects.
forcePathStyle: S3_FORCE_PATH_STYLE

ecosystem:
ui: ECOSYSTEM_UI
2 changes: 2 additions & 0 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ strategy:
region: YOUR-REGION
# Amazon S3 bucket that you have write access to
bucket: YOUR-BUCKET-ID
# Whether to force path style URLs for S3 objects.
forcePathStyle: false

ecosystem:
ui: https://cd.screwdriver.cd
4 changes: 4 additions & 0 deletions vendor/catbox-s3/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ internals.Connection.prototype.start = function (callback) {
clientOptions.signatureVersion = this.settings.signatureVersion;
}

if (this.settings.forcePathStyle) {
clientOptions.s3ForcePathStyle = this.settings.forcePathStyle;
}

this.client = new AWS.S3(clientOptions);

internals.testBucketAccess(this.client, this.settings, (err, data) => {
Expand Down

0 comments on commit d4453f2

Please sign in to comment.