Commit graph

6 commits

Author SHA1 Message Date
AndreasHuber-CH
b55cee4d1a
plugin/rewrite: Allow configuring min and max TTL values when rewriting TTL (#5508) 2022-08-17 15:33:51 -04:00
Abirdcfly
1cb294dbf9
remove redundant continue in test (#5529)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-21 08:38:38 -04:00
Uwe Krueger
40edf1e566
plugin/rewrite: streamline the ResponseRule handling. (#4473)
* plugin/rewrite: streamline the ResponseRule handling.

The functionality of a response rule is now completely encapsulated behind
a `ResponseRule` interface. This significantly simplifies the complete
processing flow, it enables more flexible response handling and it is possible
to eliminate lots of state flags, ifs and switches.

Based on the new flexibility the pull request also enables to support a
response name rewrite for all name rewrite types.
To be compatible, an explicit `answer auto` option is added to support
a best effort response rewrite (name and value).
Additionally now all name rewrite rules support additional name and value
reponse rewrite options.

Using this feature it is also possible now to rewrite a complete sub domain
hierarchy to a single domain name combined with a correct rewrite (#2389).

Signed-off-by: Uwe Krueger <uwe.krueger@sap.com>

* revert policy

Signed-off-by: Uwe Krueger <uwe.krueger@sap.com>

Co-authored-by: Miek Gieben <miek@miek.nl>
2021-05-04 10:05:45 +02:00
Miek Gieben
cd176f859b Run gofmt -s and golint on the codebase (#2918)
* Run gofmt -s and golint on the codebase

Run golint and fix everythign it flagged (except the context arg
ordering), mostly edits in the rewrite plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>

* ... and ofcourse the test as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-25 15:00:33 +08:00
Miek Gieben
7b078a885f
plugin/rewrite: silence these tests (#2120)
* plugin/rewrite: silence these tests

The old Unix saying: no news, is good news.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix da tests

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 15:28:13 +01:00
Paul G
38051b9089
plugin/rewrite: add handling of TTL field rewrites (#2048)
Resolves: #1981

Signed-off-by: Paul Greenberg <greenpau@outlook.com>
2018-08-29 10:41:03 -04:00