diff --git a/src/AmazonConnection.js b/src/AmazonConnection.js index 8e95ed9..2d98eb7 100644 --- a/src/AmazonConnection.js +++ b/src/AmazonConnection.js @@ -15,6 +15,9 @@ module.exports = awsConfig => { // Fix the Host header, since HttpConnector.makeReqParams() appends // the port number which will cause signature verification to fail req.headers.host = req.hostname + if(req.headers.Host) { + delete req.headers.Host; + } if (params.body) { req.headers['content-length'] = Buffer.byteLength(params.body, 'utf8')