aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-06-17 19:47:07 +0100
committerGravatar GitHub <noreply@github.com> 2019-06-17 19:47:07 +0100
commit8848792e4080a73cc349067fa3d85db3f71c9e28 (patch)
treea013e0579fe590e866a0575a359a081deb2f5542
parentade5ea2361aabc8a0f7b0fc0340ef890aaaf33c3 (diff)
downloadcoredns-8848792e4080a73cc349067fa3d85db3f71c9e28.tar.gz
coredns-8848792e4080a73cc349067fa3d85db3f71c9e28.tar.zst
coredns-8848792e4080a73cc349067fa3d85db3f71c9e28.zip
plugin/file: document using an explicit origin (#2893)
* plugin/file: document using an explicit origin See #2880 Signed-off-by: Miek Gieben <miek@miek.nl> * Code review comments Signed-off-by: Miek Gieben <miek@miek.nl>
-rw-r--r--plugin/file/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugin/file/README.md b/plugin/file/README.md
index 397637713..7855cdf64 100644
--- a/plugin/file/README.md
+++ b/plugin/file/README.md
@@ -67,3 +67,31 @@ Or use a single zone file for multiple zones:
}
}
~~~
+
+Note that if you have a configuration like the following you may run into a problem of the origin
+not being correctly recognized:
+
+~~~
+. {
+ file db.example.org
+}
+~~~
+
+We omit the origin for the file `db.example.org`, so this references the zone in the server block,
+which, in this case, is the root zone. Any contents of `db.example.org` will then read with that
+origin set; this may or may not do what you want.
+It's better to be explicit here and specify the correct origin. This can be done in two ways:"
+
+~~~
+. {
+ file db.example.org example.org
+}
+~~~
+
+Or
+
+~~~
+example.org {
+ file db.example.org
+}
+~~~