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.
This commit is contained in:
parent
ed907d3327
commit
30fd224504
10 changed files with 219 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue