summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-06 12:00:04 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-06 12:00:04 -0700
commitb07f6958aca4e275ff1d1aebabd0eef0e0e4b330 (patch)
tree318798300360e95655f76b8fd8839aa52916075f /modules/caddyhttp
parent33a318d17341fcaa95551710620540e00b0bb4b0 (diff)
Use "IsUnixNetwork" function instead of repeating the logic
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/reverseproxy/healthchecks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/healthchecks.go b/modules/caddyhttp/reverseproxy/healthchecks.go
index 92b3547..a64d845 100644
--- a/modules/caddyhttp/reverseproxy/healthchecks.go
+++ b/modules/caddyhttp/reverseproxy/healthchecks.go
@@ -117,7 +117,7 @@ func (h *Handler) doActiveHealthChecksForAllHosts() {
return
}
hostAddr := addr.JoinHostPort(0)
- if addr.Network == "unix" || addr.Network == "unixgram" || addr.Network == "unixpacket" {
+ if addr.IsUnixNetwork() {
// 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; unix sockets are usually local