aboutsummaryrefslogtreecommitdiff
path: root/middleware
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-09-10 20:46:25 +0100
committerGravatar GitHub <noreply@github.com> 2017-09-10 20:46:25 +0100
commit2cff9291e50c1eaffa1eb782753e9c5aaa4a6506 (patch)
treedf7466ba0d3ba5dad1a4ecfcf3a0e95b98d03f81 /middleware
parent2785f01db5aca178ad4a92ca56d5f2d56c19b0ed (diff)
downloadcoredns-2cff9291e50c1eaffa1eb782753e9c5aaa4a6506.tar.gz
coredns-2cff9291e50c1eaffa1eb782753e9c5aaa4a6506.tar.zst
coredns-2cff9291e50c1eaffa1eb782753e9c5aaa4a6506.zip
mw/whoami: update docs (#1054)
* mw/whoami: update docs Parse the corefile in the readme_test.go and other tweaks to the docs. Fixes #1049 * trailing * remove the 53 port
Diffstat (limited to 'middleware')
-rw-r--r--middleware/whoami/README.md18
1 files changed, 12 insertions, 6 deletions
diff --git a/middleware/whoami/README.md b/middleware/whoami/README.md
index 87e6e7ac7..4b56a2e77 100644
--- a/middleware/whoami/README.md
+++ b/middleware/whoami/README.md
@@ -1,15 +1,19 @@
# whoami
-*whoami* returns your local IP address, port and transport used. Your local IP address is returned in
-the additional section as either an A or AAAA record.
+*whoami* returns your resolver's local IP address, port and transport. Your IP address is returned
+ in the additional section as either an A or AAAA record.
-The port and transport are included in the additional section as a SRV record, transport can be
-"tcp" or "udp".
+The reply always has an empty answer section. The port and transport are included in the additional
+section as a SRV record, transport can be "tcp" or "udp".
~~~ txt
._<transport>.qname. 0 IN SRV 0 0 <port> .
~~~
+If CoreDNS can't find a Corefile on startup this is the *default* middleware that gets loaded. As
+such it can be used to check that CoreDNS is responding to queries. Other than that this middleware
+is of limited use in production.
+
The *whoami* middleware will respond to every A or AAAA query, regardless of the query name.
## Syntax
@@ -20,8 +24,10 @@ whoami
## Examples
-~~~ txt
-.:53 {
+Start a server on the default port and load the *whoami* middleware.
+
+~~~ corefile
+. {
whoami
}
~~~