aboutsummaryrefslogtreecommitdiff
path: root/middleware/middleware.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-09-17 17:09:05 +0100
committerGravatar GitHub <noreply@github.com> 2016-09-17 17:09:05 +0100
commit30fd224504d7e6fcfa7da027d62d2105ecb6f0c5 (patch)
treed63f32750f56265e13d5a8c98ef840f1c343395f /middleware/middleware.go
parented907d33278003072443029fef666232f16e1985 (diff)
downloadcoredns-30fd224504d7e6fcfa7da027d62d2105ecb6f0c5.tar.gz
coredns-30fd224504d7e6fcfa7da027d62d2105ecb6f0c5.tar.zst
coredns-30fd224504d7e6fcfa7da027d62d2105ecb6f0c5.zip
middleware/whoami: add (#264)
Add a new middleware that tells you who you are; IP, port and transport is echoed back. Also some various cleanup and documentation improvements while at it: * ResponseWriter: improve the documentation of these helper functions. * And add an NextHandler for use in tests. Make chaos_test.go and * whoam_test.go use it.
Diffstat (limited to 'middleware/middleware.go')
-rw-r--r--middleware/middleware.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/middleware/middleware.go b/middleware/middleware.go
index 33990c1be..804209fa9 100644
--- a/middleware/middleware.go
+++ b/middleware/middleware.go
@@ -19,9 +19,13 @@ type (
//
// If ServeDNS writes to the response body, it should return a status
// code. If the status code is not one of the following:
+ //
// * SERVFAIL (dns.RcodeServerFailure)
+ //
// * REFUSED (dns.RecodeRefused)
+ //
// * FORMERR (dns.RcodeFormatError)
+ //
// * NOTIMP (dns.RcodeNotImplemented)
//
// CoreDNS assumes *no* reply has yet been written. All other response