diff options
author | 2021-01-15 19:26:04 +0100 | |
---|---|---|
committer | 2021-01-15 18:26:04 +0000 | |
commit | 342eae9b4b1791da8fb92d36b3968839f3f38b94 (patch) | |
tree | 8ed2b47ecb8005fe68e007254dbfc355f1d2e83f /plugin.md | |
parent | f5f977f4c8c6e77a8908ebd9fce781a74c26374e (diff) | |
download | coredns-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.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |