treat host properly

This commit is contained in:
AJ ONeal 2020-03-16 20:32:45 -06:00
parent 857a7aa76c
commit 9a22677b4b
3 changed files with 6 additions and 6 deletions

View File

@ -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,

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@root/s3",
"version": "1.0.2",
"version": "1.0.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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": [