mirror of
https://github.com/coredns/coredns.git
synced 2025-11-30 07:34:02 -05:00
middleware/etcd: Return json parsing errors (#158)
When coredns unmarshals a json value and it fails it will put the error in the returned message iff the query was a debug query (o-o.debug.<REST>).
This commit is contained in:
@@ -39,7 +39,7 @@ etcd [zones...] {
|
||||
pointing to external names. If you want CoreDNS to act as a proxy for clients you'll need to add
|
||||
the proxy middleware.
|
||||
* `tls` followed the cert, key and the CA's cert filenames.
|
||||
* `debug` allow debug queries. Prefix the name with `o-o.debug.` to reveive extra information in the
|
||||
* `debug` allow debug queries. Prefix the name with `o-o.debug.` to retrieve extra information in the
|
||||
additional section of the reply in the form of text records:
|
||||
|
||||
skydns.test.skydns.dom.a. 300 CH TXT "127.0.0.1:0(10,0,,false)[0,]"
|
||||
@@ -47,6 +47,13 @@ etcd [zones...] {
|
||||
This shows the complete key as the owername, the rdata of the TXT record has:
|
||||
`host:port(priority,weight,txt content,mail)[targetstrip,group]`.
|
||||
|
||||
Any errors seen doing parsing will show up like this:
|
||||
|
||||
. 0 CH TXT "/skydns/local/skydns/r/a: invalid character '.' after object key:value pair"
|
||||
|
||||
which shows `a.r.skydns.local.` has a json encoding problem.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
This is the default SkyDNS setup, with everying specified in full:
|
||||
|
||||
Reference in New Issue
Block a user