aboutsummaryrefslogtreecommitdiff
path: root/plugin/rewrite/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/rewrite/README.md')
-rw-r--r--plugin/rewrite/README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugin/rewrite/README.md b/plugin/rewrite/README.md
index 1a6242f61..de2fae64c 100644
--- a/plugin/rewrite/README.md
+++ b/plugin/rewrite/README.md
@@ -155,7 +155,7 @@ ftp-us-west-1.coredns.rocks. 0 IN A 10.20.20.20
ftp-us-west-1.coredns.rocks. 0 IN A 10.30.30.30
```
-The syntax for the response of DNS request and response is as follows:
+The syntax for the rewrite of DNS request and response is as follows:
```
rewrite [continue|stop] {
@@ -164,6 +164,19 @@ rewrite [continue|stop] {
}
```
+Note that the above syntax is strict. For response rewrites only `name`
+rules are allowed to match the question section, and only by match type
+`regex`. The answer rewrite must be after the name, as ordered in the
+syntax example. There must only be two lines (a `name` follwed by an
+`answer`) in the brackets, additional rules are not supported.
+
+An alternate syntax for the rewrite of DNS request and response is as
+follows:
+
+```
+rewrite [continue|stop] name regex STRING STRING answer name STRING STRING
+```
+
## EDNS0 Options
Using FIELD edns0, you can set, append, or replace specific EDNS0 options on the request.