diff options
Diffstat (limited to 'plugin/secondary')
-rw-r--r-- | plugin/secondary/README.md | 10 | ||||
-rw-r--r-- | plugin/secondary/setup.go | 9 |
2 files changed, 6 insertions, 13 deletions
diff --git a/plugin/secondary/README.md b/plugin/secondary/README.md index 59ac23aea..48ba97cd3 100644 --- a/plugin/secondary/README.md +++ b/plugin/secondary/README.md @@ -23,18 +23,16 @@ A working syntax would be: secondary [zones...] { transfer from ADDRESS transfer to ADDRESS - upstream [ADDRESS...] + upstream } ~~~ * `transfer from` specifies from which address to fetch the zone. It can be specified multiple times; if one does not work, another will be tried. * `transfer to` can be enabled to allow this secondary zone to be transferred again. -* `upstream` defines upstream resolvers to be used resolve external names found (think CNAMEs) - pointing to external names. This is only really useful when CoreDNS is configured as a proxy, for - normal authoritative serving you don't need *or* want to use this. **ADDRESS** can be an IP - address, and IP:port or a string pointing to a file that is structured as /etc/resolv.conf. - If no **ADDRESS** is given, CoreDNS will resolve CNAMEs against itself. +* `upstream` resolve external names found (think CNAMEs) pointing to external names. This is only + really useful when CoreDNS is configured as a proxy; for normal authoritative serving you don't + need *or* want to use this. CoreDNS will resolve CNAMEs against itself. When a zone is due to be refreshed (Refresh timer fires) a random jitter of 5 seconds is applied, before fetching. In the case of retry this will be 2 seconds. If there are any errors diff --git a/plugin/secondary/setup.go b/plugin/secondary/setup.go index 20dc184ca..b3ca2074f 100644 --- a/plugin/secondary/setup.go +++ b/plugin/secondary/setup.go @@ -49,7 +49,7 @@ func setup(c *caddy.Controller) error { func secondaryParse(c *caddy.Controller) (file.Zones, error) { z := make(map[string]*file.Zone) names := []string{} - upstr := upstream.Upstream{} + upstr := upstream.New() for c.Next() { if c.Val() == "secondary" { @@ -78,12 +78,7 @@ func secondaryParse(c *caddy.Controller) (file.Zones, error) { return file.Zones{}, e } case "upstream": - args := c.RemainingArgs() - var err error - upstr, err = upstream.New(args) - if err != nil { - return file.Zones{}, err - } + c.RemainingArgs() // eat args default: return file.Zones{}, c.Errf("unknown property '%s'", c.Val()) } |