Skip to content

Commit 0f789ac

Browse files
committed
Add Proxy support for Splunk
1 parent 00b491b commit 0f789ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pumps/splunk.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,10 @@ func NewSplunkClient(token string, collectorURL string, skipVerify bool, certFil
302302
}
303303
tlsConfig = &tls.Config{Certificates: []tls.Certificate{cert}, ServerName: serverName}
304304
}
305-
http.DefaultClient.Transport = &http.Transport{TLSClientConfig: tlsConfig}
305+
http.DefaultClient.Transport = &http.Transport{
306+
Proxy: http.ProxyFromEnvironment,
307+
TLSClientConfig: tlsConfig,
308+
}
306309
// Append the default collector API path:
307310
u.Path = defaultPath
308311
c = &SplunkClient{

0 commit comments

Comments
 (0)