Skip to content

Commit 543366f

Browse files
authored
fix(apiclient): remove default client in facade. Fixes argoproj#6733 (argoproj#6800)
Signed-off-by: NikeNano <[email protected]>
1 parent 85f2467 commit 543366f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/apiclient/http1/facade.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ func (h Facade) EventStreamReader(in interface{}, path string) (*bufio.Reader, e
5959
req.Header.Set("Accept", "text/event-stream")
6060
req.Header.Set("Authorization", h.authorization)
6161
log.Debugf("curl -H 'Accept: text/event-stream' -H 'Authorization: ******' '%v'", u)
62-
resp, err := http.DefaultClient.Do(req)
62+
client := &http.Client{
63+
Transport: &http.Transport{
64+
TLSClientConfig: &tls.Config{
65+
InsecureSkipVerify: h.insecureSkipVerify,
66+
},
67+
},
68+
}
69+
resp, err := client.Do(req)
6370
if err != nil {
6471
return nil, err
6572
}

0 commit comments

Comments
 (0)