aboutsummaryrefslogtreecommitdiff
path: root/plugin/autopath/setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/autopath/setup.go')
-rw-r--r--plugin/autopath/setup.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go
index ed536933a..a041e364c 100644
--- a/plugin/autopath/setup.go
+++ b/plugin/autopath/setup.go
@@ -2,6 +2,7 @@ package autopath
import (
"fmt"
+ "strings"
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
@@ -50,7 +51,7 @@ func autoPathParse(c *caddy.Controller) (*AutoPath, string, error) {
return ap, "", fmt.Errorf("no resolv-conf specified")
}
resolv := zoneAndresolv[len(zoneAndresolv)-1]
- if resolv[0] == '@' {
+ if strings.HasPrefix(resolv, "@") {
mw = resolv[1:]
} else {
// assume file on disk