Skip to content

Commit

Permalink
Update default client Getters (#363)
Browse files Browse the repository at this point in the history
* By default XTerrformGet header support should be disable; clients
  needing supporting this header should overwrite the default getters
  with a custom HttpGetter

* Add default timeouts for HTTP Read Requests; including HEAD requests
  • Loading branch information
nywilken authored May 23, 2022
1 parent 5ec880f commit 31c3313
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion get.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"os/exec"
"regexp"
"syscall"
"time"

cleanhttp "github.com/hashicorp/go-cleanhttp"
)
Expand Down Expand Up @@ -70,7 +71,10 @@ var DefaultClient = &Client{

func init() {
httpGetter := &HttpGetter{
Netrc: true,
Netrc: true,
XTerraformGetDisabled: true,
HeadFirstTimeout: 10 * time.Second,
ReadTimeout: 30 * time.Second,
}

// The order of the Getters in the list may affect the result
Expand Down

0 comments on commit 31c3313

Please sign in to comment.