From 972d6c38daf483a73d7230f6cc008141de8c0b42 Mon Sep 17 00:00:00 2001 From: Nick Tan Date: Wed, 13 Sep 2023 08:56:41 -0700 Subject: [PATCH] feat: support customize net/http transport --- providers/vault/vault.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/providers/vault/vault.go b/providers/vault/vault.go index 98dfadd6..3b5efed9 100644 --- a/providers/vault/vault.go +++ b/providers/vault/vault.go @@ -57,10 +57,7 @@ type Vault struct { // Provider returns a provider that takes a Vault config. func Provider(cfg Config) *Vault { - httpClient := &http.Client{Timeout: cfg.Timeout} - if cfg.Transport != nil { - httpClient.Transport = cfg.Transport - } + httpClient := &http.Client{Timeout: cfg.Timeout, Transport: cfg.Transport} client, err := api.NewClient(&api.Config{Address: cfg.Address, HttpClient: httpClient}) if err != nil { return nil