mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 10:13:14 -05:00
plugin/auto/file/secondary: Use new upstream resolver (#1534)
* move file, auto, secondary to new upstream * include context in request
This commit is contained in:
committed by
Miek Gieben
parent
fc1d73ffa9
commit
ba573c0f40
@@ -11,9 +11,8 @@ import (
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/metrics"
|
||||
"github.com/coredns/coredns/plugin/pkg/dnsutil"
|
||||
"github.com/coredns/coredns/plugin/pkg/parse"
|
||||
"github.com/coredns/coredns/plugin/proxy"
|
||||
"github.com/coredns/coredns/plugin/pkg/upstream"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
@@ -151,11 +150,11 @@ func autoParse(c *caddy.Controller) (Auto, error) {
|
||||
if len(args) == 0 {
|
||||
return a, c.ArgErr()
|
||||
}
|
||||
ups, err := dnsutil.ParseHostPortOrFile(args...)
|
||||
var err error
|
||||
a.loader.upstream, err = upstream.NewUpstream(args)
|
||||
if err != nil {
|
||||
return a, err
|
||||
}
|
||||
a.loader.proxy = proxy.NewLookup(ups)
|
||||
|
||||
default:
|
||||
t, _, e := parse.Transfer(c, false)
|
||||
|
||||
Reference in New Issue
Block a user