|
@@ -12,6 +12,7 @@ import (
|
|
|
"github.com/coredns/coredns/plugin"
|
|
|
"github.com/coredns/coredns/plugin/metrics"
|
|
|
clog "github.com/coredns/coredns/plugin/pkg/log"
|
|
|
+ "github.com/coredns/coredns/request"
|
|
|
|
|
|
"github.com/miekg/dns"
|
|
|
)
|
|
@@ -34,6 +35,8 @@ func (e Example) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
|
|
// answer comes back, it will print "example".
|
|
|
|
|
|
// Debug log that we've have seen the query. This will only be shown when the debug plugin is loaded.
|
|
|
+ state := request.Request{W: w, Req: r}
|
|
|
+ fmt.Fprintln(out, state.QName())
|
|
|
log.Debug("Received response")
|
|
|
|
|
|
// Wrap.
|