diff options
Diffstat (limited to 'plugin/tls/tls.go')
-rw-r--r-- | plugin/tls/tls.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/tls/tls.go b/plugin/tls/tls.go index 2658159a9..ff60b678c 100644 --- a/plugin/tls/tls.go +++ b/plugin/tls/tls.go @@ -2,6 +2,7 @@ package tls import ( ctls "crypto/tls" + "path/filepath" "github.com/coredns/caddy" "github.com/coredns/coredns/core/dnsserver" @@ -57,6 +58,11 @@ func parseTLS(c *caddy.Controller) error { return c.Errf("unknown option '%s'", c.Val()) } } + for i := range args { + if !filepath.IsAbs(args[i]) && config.Root != "" { + args[i] = filepath.Join(config.Root, args[i]) + } + } tls, err := tls.NewTLSConfigFromArgs(args...) if err != nil { return err |