Skip to content

Commit

Permalink
fix(apiclient): remove default client in facade. Fixes #6733 (#6800)
Browse files Browse the repository at this point in the history
Signed-off-by: NikeNano <niklas.sven.hansson@gmail.com>
  • Loading branch information
NikeNano committed Sep 28, 2021
1 parent 85f2467 commit 543366f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/apiclient/http1/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ func (h Facade) EventStreamReader(in interface{}, path string) (*bufio.Reader, e
req.Header.Set("Accept", "text/event-stream")
req.Header.Set("Authorization", h.authorization)
log.Debugf("curl -H 'Accept: text/event-stream' -H 'Authorization: ******' '%v'", u)
resp, err := http.DefaultClient.Do(req)
client := &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: h.insecureSkipVerify,
},
},
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 543366f

Please sign in to comment.