plugin/rewrite: add closing dot for suffix rewrite rule (#2070)

* add closing dot for suffix rewrite rule
* improve rule syntax checks

Resolves: #1881
This commit is contained in:
Paul G
2018-10-23 16:59:59 -04:00
committed by GitHub
parent e8e8187a64
commit a9ce35ae4e
4 changed files with 200 additions and 38 deletions

View File

@@ -185,6 +185,16 @@ follows:
rewrite [continue|stop] name regex STRING STRING answer name STRING STRING
```
When using `exact` name rewrite rules, answer gets re-written automatically,
and there is no need defining `answer name` instruction. The below rule
rewrites the name in a request from `RED` to `BLUE`, and subsequently
rewrites the name in a corresponding response from `BLUE` to `RED`. The
client in the request would see only `RED` and no `BLUE`.
```
rewrite [continue|stop] name exact RED BLUE
```
### TTL Field Rewrites
At times, the need for rewriting TTL value could arise. For example, a DNS server