mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Suppress proxy error for truncated responses (#154)
* suppress proxy error for truncated responses * Add proxy truncated error suppression for TCP too
This commit is contained in:
@@ -26,9 +26,15 @@ func (p ReverseProxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg, extra []dns.RR)
|
||||
reply, err = middleware.Exchange(p.Client.UDP, r, p.Host)
|
||||
}
|
||||
|
||||
if reply != nil && reply.Truncated {
|
||||
// Suppress proxy error for truncated responses
|
||||
err = nil
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
reply.Compress = true
|
||||
reply.Id = r.Id
|
||||
w.WriteMsg(reply)
|
||||
|
||||
Reference in New Issue
Block a user