Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
log http(s) proxy env variables on start
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored May 16, 2023
1 parent 0532693 commit 14552bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/godplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/netdata/go.d.plugin/pkg/multipath"

"github.com/jessevdk/go-flags"
"golang.org/x/net/http/httpproxy"

_ "github.com/netdata/go.d.plugin/modules"
)
Expand Down Expand Up @@ -116,6 +117,9 @@ func main() {
a.Debugf("current user: name=%s, uid=%s", u.Username, u.Uid)
}

cfg := httpproxy.FromEnvironment()
a.Infof("env HTTP_PROXY '%s', HTTPS_PROXY '%s' (both upper and lower case are respected)", cfg.HTTPProxy, cfg.HTTPSProxy)

a.Run()
}

Expand Down

0 comments on commit 14552bb

Please sign in to comment.