diff options
Diffstat (limited to 'plugin/secondary/setup.go')
-rw-r--r-- | plugin/secondary/setup.go | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/plugin/secondary/setup.go b/plugin/secondary/setup.go index 108415290..83d8e56ef 100644 --- a/plugin/secondary/setup.go +++ b/plugin/secondary/setup.go @@ -43,7 +43,6 @@ func setup(c *caddy.Controller) error { func secondaryParse(c *caddy.Controller) (file.Zones, error) { z := make(map[string]*file.Zone) names := []string{} - upstr := upstream.New() for c.Next() { if c.Val() == "secondary" { @@ -62,30 +61,24 @@ func secondaryParse(c *caddy.Controller) (file.Zones, error) { for c.NextBlock() { - t, f := []string{}, []string{} - var e error + f := []string{} switch c.Val() { case "transfer": - t, f, e = parse.Transfer(c, true) - if e != nil { - return file.Zones{}, e + var err error + f, err = parse.TransferIn(c) + if err != nil { + return file.Zones{}, err } - case "upstream": - // remove soon - c.RemainingArgs() default: return file.Zones{}, c.Errf("unknown property '%s'", c.Val()) } for _, origin := range origins { - if t != nil { - z[origin].TransferTo = append(z[origin].TransferTo, t...) - } if f != nil { z[origin].TransferFrom = append(z[origin].TransferFrom, f...) } - z[origin].Upstream = upstr + z[origin].Upstream = upstream.New() } } } |