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.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/rewrite/README.md b/plugin/rewrite/README.md
index 680e69722..feec7dc81 100644
--- a/plugin/rewrite/README.md
+++ b/plugin/rewrite/README.md
@@ -209,12 +209,24 @@ rewrites the first local option with code 0xffee, setting the data to "abcd". Eq
* A variable data is specified with a pair of curly brackets `{}`. Following are the supported variables:
{qname}, {qtype}, {client_ip}, {client_port}, {protocol}, {server_ip}, {server_port}.
-Example:
+* If the metadata plugin is enabled, then labels are supported as variables if they are presented within curly brackets.
+the variable data will be filled with the value associated with that label. If that label is not provided,
+the variable will be silently substitute by an empty string.
+
+Examples:
~~~
rewrite edns0 local set 0xffee {client_ip}
~~~
+The following example uses metadata and an imaginary "some-plugin" that would provide "some-label" as metadata information.
+
+~~~
+metadata
+some-plugin
+rewrite edns0 local set 0xffee {some-plugin/some-label}
+~~~
+
### EDNS0_NSID
This has no fields; it will add an NSID option with an empty string for the NSID. If the option already exists