Closed yugasun closed 5 years ago
Can you explain why you want to set the Host header? aws4
will do that for you.
Also, .us-east-1.amazonaws.com
isn't a valid host
I just want to verify aws4 signature, so I need use headers
and query
from other server, when we mock a host using empty service prefix like .us-east-1.amazonaws.com
, aws4
will set service
to us-east-1
automatically.
But that's not a valid host – a host name cannot start with a period. aws4
isn't going to support invalid hosts
Well, I'll close this pr.
When I set
Host
in headers like.us-east-1.amazonaws.com
, I just want to use empty string forsevice
, but it parsedservice
tous-east-1
which is equal toregion
, so I fixRequestSigner.prototype.matchHost
function for it.