aboutsummaryrefslogtreecommitdiff
path: root/plugin.md
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2021-01-15 19:26:04 +0100
committerGravatar GitHub <noreply@github.com> 2021-01-15 18:26:04 +0000
commit342eae9b4b1791da8fb92d36b3968839f3f38b94 (patch)
tree8ed2b47ecb8005fe68e007254dbfc355f1d2e83f /plugin.md
parentf5f977f4c8c6e77a8908ebd9fce781a74c26374e (diff)
downloadcoredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.tar.gz
coredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.tar.zst
coredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.zip
plugin/file: guard against cname loops (#4387)
Automatically submitted.
Diffstat (limited to 'plugin.md')
-rw-r--r--plugin.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin.md b/plugin.md
index 68ab10e50..f7158651c 100644
--- a/plugin.md
+++ b/plugin.md
@@ -69,6 +69,15 @@ works, and implement the `ready.Readiness` interface.
See the plugin/pkg/reuseport for `Listen` and `ListenPacket` functions. Using these functions makes
your plugin handle reload events better.
+## Context
+
+Every request get a context.Context these are pre-filled with 2 values:
+
+* `Key`: holds a pointer to the current server, this can be useful for logging or metrics. It is
+ infact used in the *metrics* plugin to tie a request to a specific (internal) server.
+* `LoopKey`: holds an integer to detect loops within the current context. The *file* plugin uses
+ this to detect loops when resolving CNAMEs.
+
## Documentation
Each plugin should have a README.md explaining what the plugin does and how it is configured. The