mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-04 14:58:47 +00:00
Use "IsUnixNetwork" function instead of repeating the logic
This commit is contained in:
parent
33a318d173
commit
b07f6958ac
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue