Skip to content

Commit

Permalink
add http proxy support
Browse files Browse the repository at this point in the history
HuanMeng0 authored and fbreckle committed Aug 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 43c2dc4 commit 028686d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netbox/client.go
Original file line number Diff line number Diff line change
@@ -60,6 +60,8 @@ func (cfg *Config) Client() (*netboxclient.NetBoxAPI, error) {
return nil, err
}

trans.(*http.Transport).Proxy = http.ProxyFromEnvironment

if cfg.Headers != nil && len(cfg.Headers) > 0 {
log.WithFields(log.Fields{
"custom_headers": cfg.Headers,

0 comments on commit 028686d

Please sign in to comment.