Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 8f029d8

Browse files
author
Armstrong Li
committed
fix issue #621 endless recursion
1 parent e00690e commit 8f029d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

provider_client.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ func (client *ProviderClient) Request(method, url string, options RequestOpts) (
168168
}
169169
req.Header.Set("Accept", applicationJSON)
170170

171-
for k, v := range client.AuthenticatedHeaders() {
172-
req.Header.Add(k, v)
173-
}
174171

175172
// Set the User-Agent header
176173
req.Header.Set("User-Agent", client.UserAgent.Join())
@@ -185,6 +182,11 @@ func (client *ProviderClient) Request(method, url string, options RequestOpts) (
185182
}
186183
}
187184

185+
// get latest auth token
186+
for k, v := range client.AuthenticatedHeaders() {
187+
req.Header.Set(k, v)
188+
}
189+
188190
// Set connection parameter to close the connection immediately when we've got the response
189191
req.Close = true
190192

0 commit comments

Comments
 (0)