Skip to content

Commit

Permalink
dnsmadeeasy: use default transport (#2362)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Nov 27, 2024
1 parent abccd21 commit 2c42b26
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions providers/dns/dnsmadeeasy/dnsmadeeasy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,22 @@ type Config struct {

// NewDefaultConfig returns a default configuration for the DNSProvider.
func NewDefaultConfig() *Config {
tr := &http.Transport{}

defaultTransport, ok := http.DefaultTransport.(*http.Transport)
if ok {
tr = defaultTransport.Clone()
}

tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

return &Config{
TTL: env.GetOrDefaultInt(EnvTTL, dns01.DefaultTTL),
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval),
HTTPClient: &http.Client{
Timeout: env.GetOrDefaultSecond(EnvHTTPTimeout, 10*time.Second),
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
Timeout: env.GetOrDefaultSecond(EnvHTTPTimeout, 10*time.Second),
Transport: tr,
},
}
}
Expand Down

0 comments on commit 2c42b26

Please sign in to comment.