Add support for contacting logs via HTTP proxies

Just set the appropriate environment variable as documented at
https://golang.org/pkg/net/http/#ProxyFromEnvironment

Closes: #31
Closes: #41
This commit is contained in:
Andrew Ayer 2020-06-30 10:37:34 -04:00
parent 74a7329c00
commit 18b2d6d2a5
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ func New(uri string) *LogClient {
var c LogClient
c.uri = uri
transport := &httpclient.Transport{
Proxy: http.ProxyFromEnvironment,
ConnectTimeout: 10 * time.Second,
RequestTimeout: 60 * time.Second,
ResponseHeaderTimeout: 30 * time.Second,