From 858b20f555e783548dd6fc93dc1e1b46a5e12c59 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 18 Sep 2020 04:27:52 -0600 Subject: [PATCH] bugfix using manual host (minio) for bucket --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index d556a4e..ee0eed8 100644 --- a/index.js +++ b/index.js @@ -41,7 +41,7 @@ module.exports = S3 = { } 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, @@ -91,7 +91,7 @@ module.exports = S3 = { } 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, @@ -152,7 +152,7 @@ module.exports = S3 = { } 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, @@ -196,7 +196,7 @@ module.exports = S3 = { } 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,