mirror of
https://github.com/coredns/coredns.git
synced 2025-12-12 21:35:11 -05:00
plugin/forward: added option failfast_all_unhealthy_upstreams to return servfail if all upstreams are down (#6999)
* feat: option to return servfail if upstreams are down Signed-off-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net> * fix based on review comments and added to Readme Signed-off-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net> * add tests to improve code coverage Signed-off-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net> * added failfast_all_unhealthy_upstreams option to forward plugin Signed-off-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net> --------- Signed-off-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net> Co-authored-by: Puneet Loya <puneetloya@Puneets-MBP.attlocal.net>
This commit is contained in:
@@ -306,6 +306,12 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
|
||||
|
||||
f.nextAlternateRcodes = append(f.nextAlternateRcodes, rc)
|
||||
}
|
||||
case "failfast_all_unhealthy_upstreams":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) != 0 {
|
||||
return c.ArgErr()
|
||||
}
|
||||
f.failfastUnhealthyUpstreams = true
|
||||
default:
|
||||
return c.Errf("unknown property '%s'", c.Val())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user