- dns rewrites: CNAME record didn't work

This commit is contained in:
Simon Zolin 2019-11-07 15:27:39 +03:00
parent e04ffde105
commit 090f549833
1 changed files with 1 additions and 0 deletions

View File

@ -432,6 +432,7 @@ func (s *Server) handleDNSRequest(p *proxy.Proxy, d *proxy.DNSContext) error {
if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 {
d.Req.Question[0] = originalQuestion
d.Res.Question[0] = originalQuestion
if len(d.Res.Answer) != 0 {
answer = append(answer, d.Res.Answer...) // host -> IP