Skip to content

Commit

Permalink
feat: support customize net/http transport
Browse files Browse the repository at this point in the history
  • Loading branch information
missedone committed Sep 13, 2023
1 parent 24659c0 commit 972d6c3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions providers/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 972d6c3

Please sign in to comment.