diff options
author | 2022-02-09 15:45:52 +0100 | |
---|---|---|
committer | 2022-02-09 09:45:52 -0500 | |
commit | b0edae07f1b1b3a0e785c3731cc24c43c2a35210 (patch) | |
tree | e90ca26a9ec783e51db01c1fea2be4e167a8701b /plugin/forward/setup.go | |
parent | abaf938623eaae632afd8548ebf5fdc5c3197c5a (diff) | |
download | coredns-b0edae07f1b1b3a0e785c3731cc24c43c2a35210.tar.gz coredns-b0edae07f1b1b3a0e785c3731cc24c43c2a35210.tar.zst coredns-b0edae07f1b1b3a0e785c3731cc24c43c2a35210.zip |
Health-checks should respect force_tcp (#5109)
* health check should respect force_tcp
Signed-off-by: tombokombo <tombo@sysart.tech>
Diffstat (limited to 'plugin/forward/setup.go')
-rw-r--r-- | plugin/forward/setup.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/forward/setup.go b/plugin/forward/setup.go index 8bd1e1ff4..010dfa754 100644 --- a/plugin/forward/setup.go +++ b/plugin/forward/setup.go @@ -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 |