Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions prober/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr
httpConfig.Method = "GET"
}

origHost := targetURL.Host
if ip != nil {
// Replace the host field in the URL with the IP we resolved.
if targetPort == "" {
Expand Down Expand Up @@ -430,7 +429,7 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr
level.Error(logger).Log("msg", "Error creating request", "err", err)
return
}
request.Host = origHost
request.Host = targetHost
request = request.WithContext(ctx)

for key, value := range httpConfig.Headers {
Expand Down