aboutsummaryrefslogtreecommitdiff
path: root/plugin/loop/setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/loop/setup.go')
-rw-r--r--plugin/loop/setup.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/loop/setup.go b/plugin/loop/setup.go
index 68af97e5e..13551c2b6 100644
--- a/plugin/loop/setup.go
+++ b/plugin/loop/setup.go
@@ -59,7 +59,7 @@ func setup(c *caddy.Controller) error {
func parse(c *caddy.Controller) (*Loop, error) {
i := 0
- zone := "."
+ zones := []string{"."}
for c.Next() {
if i > 0 {
return nil, plugin.ErrOnce
@@ -70,10 +70,10 @@ func parse(c *caddy.Controller) (*Loop, error) {
}
if len(c.ServerBlockKeys) > 0 {
- zone = plugin.Host(c.ServerBlockKeys[0]).Normalize()
+ zones = plugin.Host(c.ServerBlockKeys[0]).Normalize()
}
}
- return New(zone), nil
+ return New(zones[0]), nil
}
// qname returns a random name. <rand.Int()>.<rand.Int().<zone>.