plugin/rewrite: add rcode as a rewrite option (#6204)
* plugin/forward add ignore_server_failure for masking upstream server faults Signed-off-by: schou <pschou@users.noreply.github.com> * Switch from a ignore_server_fail to a rewrite rcode type. Signed-off-by: schou <pschou@users.noreply.github.com> * trim down the tests Signed-off-by: schou <pschou@users.noreply.github.com> * fixing readme TTL and using map for rcode Signed-off-by: schou <pschou@users.noreply.github.com> * add newline Signed-off-by: schou <pschou@users.noreply.github.com> --------- Signed-off-by: schou <pschou@users.noreply.github.com>
This commit is contained in:
parent
07c7dc82f0
commit
5ace19d455
4 changed files with 308 additions and 0 deletions
|
@ -141,6 +141,8 @@ func newRule(args ...string) (Rule, error) {
|
|||
return newTTLRule(mode, args[startArg:]...)
|
||||
case "cname":
|
||||
return newCNAMERule(mode, args[startArg:]...)
|
||||
case "rcode":
|
||||
return newRCodeRule(mode, args[startArg:]...)
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid rule type %q", args[0])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue