diff options
author | 2016-11-29 09:54:57 +0000 | |
---|---|---|
committer | 2016-11-29 09:54:57 +0000 | |
commit | 4cfd19c7c97490dac47cd748166ec3f976e315aa (patch) | |
tree | 333b9851d6c5c80a374bf1084d2e012402710a87 /middleware/etcd/handler.go | |
parent | a1b9f96d876483b4356dddd83c24896d867e843c (diff) | |
download | coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.tar.gz coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.tar.zst coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.zip |
middleware/httpproxy: add debug queries (#446)
* middleware/httproxy: implement debug queries
Not too useful at the moment, but o-o.debug queries are supported
and return the Comment from dns.google.com.
Note that this is not always set.
* improve documentation
* Testing cleanups
Diffstat (limited to 'middleware/etcd/handler.go')
-rw-r--r-- | middleware/etcd/handler.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/middleware/etcd/handler.go b/middleware/etcd/handler.go index c4fa3c46e..b462d7c5b 100644 --- a/middleware/etcd/handler.go +++ b/middleware/etcd/handler.go @@ -5,6 +5,7 @@ import ( "github.com/miekg/coredns/middleware" "github.com/miekg/coredns/middleware/etcd/msg" + "github.com/miekg/coredns/middleware/pkg/debug" "github.com/miekg/coredns/middleware/pkg/dnsutil" "github.com/miekg/coredns/request" @@ -21,10 +22,10 @@ func (e *Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) ( } name := state.Name() if e.Debugging { - if debug := isDebug(name); debug != "" { + if bug := debug.IsDebug(name); bug != "" { opt.Debug = r.Question[0].Name state.Clear() - state.Req.Question[0].Name = debug + state.Req.Question[0].Name = bug } } |