fix: Add timeout for http client (#1318)

* fix: Add timeout for http client

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Update tls_utils.go
pull/1319/head
Anatolii Bazko 2022-02-04 08:17:16 +02:00 committed by GitHub
parent d571e53b3d
commit a00fe513ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -248,6 +248,7 @@ func doRequestForTLSCrtChain(ctx *deploy.DeployContext, requestURL string, skipP
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
client := &http.Client{
Transport: transport,
Timeout: time.Second * 3,
}
req, err := http.NewRequest("GET", requestURL, nil)