Skip to content

Commit 230e538

Browse files
authored
STSCertificateIdentity: Init request form (#1770)
Initialize request form before writing. Fixes #1769
1 parent 5211dc3 commit 230e538

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/credentials/sts_tls_identity.go

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ func (i *STSCertificateIdentity) Retrieve() (Value, error) {
140140
if err != nil {
141141
return Value{}, err
142142
}
143+
if req.Form == nil {
144+
req.Form = url.Values{}
145+
}
143146
req.Form.Add("DurationSeconds", strconv.FormatUint(uint64(livetime.Seconds()), 10))
144147

145148
resp, err := i.Client.Do(req)

0 commit comments

Comments
 (0)