mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 18:53:43 -04:00
plugin/rewrite: tweak parse error messaging, add tests (#1737)
* tweak parse error messaging, add tests * looser err msg checking
This commit is contained in:
committed by
Miek Gieben
parent
9e8893a0b5
commit
5e06687ee5
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user