diff options
Diffstat (limited to 'plugin/auto')
-rw-r--r-- | plugin/auto/README.md | 6 | ||||
-rw-r--r-- | plugin/auto/auto.go | 2 | ||||
-rw-r--r-- | plugin/auto/setup.go | 11 |
3 files changed, 5 insertions, 14 deletions
diff --git a/plugin/auto/README.md b/plugin/auto/README.md index b2644c17b..3101366b7 100644 --- a/plugin/auto/README.md +++ b/plugin/auto/README.md @@ -18,7 +18,7 @@ auto [ZONES...] { directory DIR [REGEXP ORIGIN_TEMPLATE [TIMEOUT]] reload DURATION no_reload - upstream [ADDRESS...] + upstream } ~~~ @@ -37,9 +37,7 @@ are used. and reloads zone when serial changes. * `no_reload` deprecated. Sets reload to 0. * `upstream` defines upstream resolvers to be used resolve external names found (think CNAMEs) - pointing to external names. **ADDRESS** can be an IP address, an 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. + pointing to external names. CoreDNS will resolve CNAMEs against itself. All directives from the *file* plugin are supported. Note that *auto* will load all zones found, even though the directive might only receive queries for a specific zone. I.e: diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go index 8cbfaf948..a09c22801 100644 --- a/plugin/auto/auto.go +++ b/plugin/auto/auto.go @@ -33,7 +33,7 @@ type ( // In the future this should be something like ZoneMeta that contains all this stuff. transferTo []string ReloadInterval time.Duration - upstream upstream.Upstream // Upstream for looking up names during the resolution process. + upstream *upstream.Upstream // Upstream for looking up names during the resolution process. duration time.Duration } diff --git a/plugin/auto/setup.go b/plugin/auto/setup.go index f8356aa3d..62a4da870 100644 --- a/plugin/auto/setup.go +++ b/plugin/auto/setup.go @@ -155,15 +155,8 @@ func autoParse(c *caddy.Controller) (Auto, error) { a.loader.ReloadInterval = 0 case "upstream": - args := c.RemainingArgs() - if len(args) == 0 { - return a, c.ArgErr() - } - var err error - a.loader.upstream, err = upstream.New(args) - if err != nil { - return a, err - } + c.RemainingArgs() // eat remaining args + a.loader.upstream = upstream.New() default: t, _, e := parse.Transfer(c, false) |