From 9a22677b4b3a5c2bb8c85b2d13d5487eda88a407 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 16 Mar 2020 20:32:45 -0600 Subject: [PATCH] treat host properly --- index.js | 8 ++++---- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 735e045..6692fd7 100644 --- a/index.js +++ b/index.js @@ -45,7 +45,7 @@ module.exports = { } var signed = aws4.sign( { - host: host || bucket + '.s3.amazonaws.com', + host: host || (bucket + '.s3.amazonaws.com'), service: 's3', region: region, path: (host ? '/' + bucket : '') + '/' + prefix + key, @@ -89,7 +89,7 @@ module.exports = { } var signed = aws4.sign( { - host: host || bucket + '.s3.amazonaws.com', + host: host || (bucket + '.s3.amazonaws.com'), service: 's3', region: region, path: (host ? '/' + bucket : '') + '/' + prefix + key, @@ -144,7 +144,7 @@ module.exports = { } var signed = aws4.sign( { - host: host || bucket + '.s3.amazonaws.com', + host: host || (bucket + '.s3.amazonaws.com'), service: 's3', region: region, path: (host ? '/' + bucket : '') + '/' + prefix + key, @@ -193,7 +193,7 @@ module.exports = { } var signed = aws4.sign( { - host: host || bucket + '.s3.amazonaws.com', + host: host || (bucket + '.s3.amazonaws.com'), service: 's3', region: region, path: (host ? '/' + bucket : '') + '/' + prefix + key, diff --git a/package-lock.json b/package-lock.json index 89ae09a..eab1fdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@root/s3", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 73b3e2f..7e3fc1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@root/s3", - "version": "1.0.2", + "version": "1.0.3", "description": "A simple, lightweight s3 client with only 2 dependencies", "main": "index.js", "files": [