Skip to content

Commit f9f6178

Browse files
author
jojoliang
committed
add host to signature
1 parent 7b799af commit f9f6178

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func newAuthorization(secretID, secretKey string, req *http.Request, authTime *A
125125
keyTime := authTime.keyString()
126126
signKey := calSignKey(secretKey, keyTime)
127127

128+
req.Header.Set("Host", req.Host)
128129
formatHeaders := *new(string)
129130
signedHeaderList := *new([]string)
130131
formatHeaders, signedHeaderList = genFormatHeaders(req.Header)

0 commit comments

Comments
 (0)