From e73b117332a5606a986ee7e03e6f4b0cea7871c9 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 14 Sep 2019 13:25:26 -0600 Subject: reverse_proxy: Ability to mutate headers; set upstream placeholders --- modules/caddyhttp/reverseproxy/healthchecks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp/reverseproxy/healthchecks.go') 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) } -- cgit v1.2.3