aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-12-07 22:25:05 +0000
committerGravatar GitHub <noreply@github.com> 2017-12-07 22:25:05 +0000
commit0e8ceea1d6f051c026a6210334cda2f5e29ebba4 (patch)
treeebf8a516654473abe152de085e5b4772e7183fab /plugin
parent7435db968b5313b22be5023ad906b056e1bfa154 (diff)
downloadcoredns-0e8ceea1d6f051c026a6210334cda2f5e29ebba4.tar.gz
coredns-0e8ceea1d6f051c026a6210334cda2f5e29ebba4.tar.zst
coredns-0e8ceea1d6f051c026a6210334cda2f5e29ebba4.zip
plugin/proxy: skip hc for https_google (#1272)
If protocol is https_google we do the health checks wrong, i.e. we're healthchecking the wrong endpoint, hence the health check code below should not be executed. See issue #1202. This is an ugly hack and the thing requires a rethink. Possibly in conjunction with moving to the *forward* plugin.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/proxy/proxy.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/proxy/proxy.go b/plugin/proxy/proxy.go
index 476eddaff..c62e2aec3 100644
--- a/plugin/proxy/proxy.go
+++ b/plugin/proxy/proxy.go
@@ -120,6 +120,14 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
}
}
+ // If protocol is https_google we do the health checks wrong, i.e. we're healthchecking the wrong
+ // endpoint, hence the health check code below should not be executed. See issue #1202.
+ // This is an ugly hack and the thing requires a rethink. Possibly in conjunction with moving
+ // to the *forward* plugin.
+ if upstream.Exchanger().Protocol() == "https_google" {
+ continue
+ }
+
timeout := host.FailTimeout
if timeout == 0 {
timeout = defaultFailTimeout