diff --git a/plugin/cache/cache.go b/plugin/cache/cache.go index 4a6377b9a..6dc6dc0a2 100644 --- a/plugin/cache/cache.go +++ b/plugin/cache/cache.go @@ -182,6 +182,7 @@ func (w *ResponseWriter) RemoteAddr() net.Addr { // WriteMsg implements the dns.ResponseWriter interface. func (w *ResponseWriter) WriteMsg(res *dns.Msg) error { + res = res.Copy() mt, _ := response.Typify(res, w.now().UTC()) // key returns empty string for anything we don't want to cache.