aboutsummaryrefslogtreecommitdiff
path: root/plugin/rewrite/rewrite.go
diff options
context:
space:
mode:
authorGravatar pschou <pschou@users.noreply.github.com> 2023-08-26 22:20:12 -0400
committerGravatar GitHub <noreply@github.com> 2023-08-26 22:20:12 -0400
commit5ace19d4557cc441e63768247175cd753e62b55c (patch)
tree3ffab2d90ea3a42789e8d265523f85fed22a88f8 /plugin/rewrite/rewrite.go
parent07c7dc82f0a76ef5438e878aaf5c7b319135ac7e (diff)
downloadcoredns-5ace19d4557cc441e63768247175cd753e62b55c.tar.gz
coredns-5ace19d4557cc441e63768247175cd753e62b55c.tar.zst
coredns-5ace19d4557cc441e63768247175cd753e62b55c.zip
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>
Diffstat (limited to 'plugin/rewrite/rewrite.go')
-rw-r--r--plugin/rewrite/rewrite.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/rewrite/rewrite.go b/plugin/rewrite/rewrite.go
index d991c7f02..edb11813e 100644
--- a/plugin/rewrite/rewrite.go
+++ b/plugin/rewrite/rewrite.go
@@ -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])
}