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
This commit is contained in:
parent
a1b9f96d87
commit
4cfd19c7c9
12 changed files with 108 additions and 55 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue