aboutsummaryrefslogtreecommitdiff
path: root/middleware/file/dname.go
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/file/dname.go')
-rw-r--r--middleware/file/dname.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/middleware/file/dname.go b/middleware/file/dname.go
index e4c29c77d..6bbfd9377 100644
--- a/middleware/file/dname.go
+++ b/middleware/file/dname.go
@@ -1,7 +1,7 @@
package file
import (
- "strings"
+ "github.com/coredns/coredns/middleware/pkg/dnsutil"
"github.com/miekg/dns"
)
@@ -14,7 +14,7 @@ func substituteDNAME(qname, owner, target string) string {
labels := dns.SplitDomainName(qname)
labels = append(labels[0:len(labels)-dns.CountLabel(owner)], dns.SplitDomainName(target)...)
- return strings.Join(labels, ".") + "."
+ return dnsutil.Join(labels)
}
return ""