mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 01:34:21 -04:00 
			
		
		
		
	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:
		| @@ -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 | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user