all: implement policy failover rcodes

While at it, ensure that config is validated, and fixing a bug related
to reuse ctx between multiple upstreams resolving.
This commit is contained in:
Cuong Manh Le
2022-12-14 23:34:24 +07:00
committed by Cuong Manh Le
parent fe0faac8c4
commit ccada70e31
8 changed files with 148 additions and 23 deletions

View File

@@ -59,6 +59,7 @@ port = 1337
[listener.0.policy]
name = "My Policy"
failover_rcodes = ["NXDOMAIN", "SERVFAIL"]
networks = [
{"network.0" = ["upstream.1", "upstream.0"]},
{"network.1" = ["upstream.0"]},