summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy/healthchecks.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-14 13:25:26 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-14 13:25:26 -0600
commite73b117332a5606a986ee7e03e6f4b0cea7871c9 (patch)
treee2819a50e4bfdab7d0d1511bc433b1b41e403da2 /modules/caddyhttp/reverseproxy/healthchecks.go
parent2fd22139c6b7b6055ae53c77d56278fce38d1195 (diff)
reverse_proxy: Ability to mutate headers; set upstream placeholders
Diffstat (limited to 'modules/caddyhttp/reverseproxy/healthchecks.go')
-rw-r--r--modules/caddyhttp/reverseproxy/healthchecks.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/reverseproxy/healthchecks.go b/modules/caddyhttp/reverseproxy/healthchecks.go
index abe0f9c..084a693 100644
--- a/modules/caddyhttp/reverseproxy/healthchecks.go
+++ b/modules/caddyhttp/reverseproxy/healthchecks.go
@@ -111,10 +111,10 @@ func (h *Handler) doActiveHealthChecksForAllHosts() {
if network == "unix" || network == "unixgram" || network == "unixpacket" {
// this will be used as the Host portion of a http.Request URL, and
// paths to socket files would produce an error when creating URL,
- // so use a fake Host value instead
- hostAddr = network
+ // so use a fake Host value instead; unix sockets are usually local
+ hostAddr = "localhost"
}
- err = h.doActiveHealthCheck(DialInfo{network, addrs[0]}, hostAddr, host)
+ err = h.doActiveHealthCheck(NewDialInfo(network, addrs[0]), hostAddr, host)
if err != nil {
log.Printf("[ERROR] reverse_proxy: active health check for host %s: %v", networkAddr, err)
}