diff options
Diffstat (limited to 'plugin/pkg/replacer/replacer.go')
-rw-r--r-- | plugin/pkg/replacer/replacer.go | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/plugin/pkg/replacer/replacer.go b/plugin/pkg/replacer/replacer.go index b9e1fcaa6..695e9e392 100644 --- a/plugin/pkg/replacer/replacer.go +++ b/plugin/pkg/replacer/replacer.go @@ -35,13 +35,11 @@ func New(r *dns.Msg, rr *dnstest.Recorder, emptyValue string) Replacer { req := request.Request{W: rr, Req: r} rep := replacer{ replacements: map[string]string{ - "{type}": req.Type(), - "{name}": req.Name(), - "{class}": req.Class(), - "{proto}": req.Proto(), - "{when}": func() string { - return time.Now().Format(timeFormat) - }(), + "{type}": req.Type(), + "{name}": req.Name(), + "{class}": req.Class(), + "{proto}": req.Proto(), + "{when}": "", // made a noop "{size}": strconv.Itoa(req.Len()), "{remote}": addrToRFC3986(req.IP()), "{port}": req.Port(), @@ -163,7 +161,4 @@ func addrToRFC3986(addr string) string { return addr } -const ( - timeFormat = "02/Jan/2006:15:04:05 -0700" - headerReplacer = "{>" -) +const headerReplacer = "{>" |