Skip to content

Commit

Permalink
Fixed condition, when local dns lookup should happen.
Browse files Browse the repository at this point in the history
Bug was introduced with option proy_from_enviroment with release V0.24.

Signed-off-by: Ulrike Klusik <[email protected]>
  • Loading branch information
ulikl committed Jul 30, 2024
1 parent 3dd5dfe commit 0412f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prober/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr
targetPort := targetURL.Port()

var ip *net.IPAddr
if !module.HTTP.SkipResolvePhaseWithProxy || module.HTTP.HTTPClientConfig.ProxyConfig.ProxyURL.URL == nil || module.HTTP.HTTPClientConfig.ProxyConfig.ProxyFromEnvironment {
if !module.HTTP.SkipResolvePhaseWithProxy || (module.HTTP.HTTPClientConfig.ProxyConfig.ProxyURL.URL == nil && !module.HTTP.HTTPClientConfig.ProxyConfig.ProxyFromEnvironment ) {
var lookupTime float64
ip, lookupTime, err = chooseProtocol(ctx, module.HTTP.IPProtocol, module.HTTP.IPProtocolFallback, targetHost, registry, logger)
durationGaugeVec.WithLabelValues("resolve").Add(lookupTime)
Expand Down

0 comments on commit 0412f5a

Please sign in to comment.