aboutsummaryrefslogtreecommitdiff
path: root/plugin/hosts/setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/hosts/setup.go')
-rw-r--r--plugin/hosts/setup.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/hosts/setup.go b/plugin/hosts/setup.go
index 57413feed..ca4635f0a 100644
--- a/plugin/hosts/setup.go
+++ b/plugin/hosts/setup.go
@@ -69,7 +69,13 @@ func hostsParse(c *caddy.Controller) (Hosts, error) {
config := dnsserver.GetConfig(c)
inline := []string{}
+ i := 0
for c.Next() {
+ if i > 0 {
+ return h, plugin.ErrOnce
+ }
+ i++
+
args := c.RemainingArgs()
if len(args) >= 1 {
h.path = args[0]