allow an empty response (#2855)
This commit is contained in:
parent
3b3fb6f583
commit
e1d0b63e3f
2 changed files with 7 additions and 11 deletions
|
@ -155,10 +155,6 @@ func templateParse(c *caddy.Controller) (handler Handler, err error) {
|
|||
t.regex = append(t.regex, regexp.MustCompile(".*"))
|
||||
}
|
||||
|
||||
if len(t.answer) == 0 && len(t.authority) == 0 && t.rcode == dns.RcodeSuccess {
|
||||
return handler, c.Errf("no answer section for template found: %v", handler)
|
||||
}
|
||||
|
||||
handler.Templates = append(handler.Templates, t)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue