Health-checks should respect force_tcp (#5109)

* health check should respect force_tcp

Signed-off-by: tombokombo <tombo@sysart.tech>
This commit is contained in:
Tomas Hulata
2022-02-09 15:45:52 +01:00
committed by GitHub
parent abaf938623
commit b0edae07f1
3 changed files with 49 additions and 0 deletions

View File

@@ -144,6 +144,10 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
}
f.proxies[i].SetExpire(f.expire)
f.proxies[i].health.SetRecursionDesired(f.opts.hcRecursionDesired)
// when TLS is used, checks are set to tcp-tls
if f.opts.forceTCP && transports[i] != transport.TLS {
f.proxies[i].health.SetTCPTransport()
}
}
return f, nil