From aa564761b59180eea1e4ac4d00d5fb7dcf8cfb26 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Sun, 9 Apr 2017 16:26:53 +0100 Subject: [PATCH] Nameserver identification fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ©! I, Hugo Landau , hereby licence these changes under the ©! licence with SHA256 hash ©! fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc. --- server/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/server.go b/server/server.go index 5e5d684..28171fd 100644 --- a/server/server.go +++ b/server/server.go @@ -78,9 +78,11 @@ func New(cfg *Config) (s *Server, err error) { }, } - s.cfg.canonicalNameservers = strings.Split(s.cfg.CanonicalNameservers, ",") - for i := range s.cfg.canonicalNameservers { - s.cfg.canonicalNameservers[i] = dns.Fqdn(s.cfg.canonicalNameservers[i]) + if s.cfg.CanonicalNameservers != "" { + s.cfg.canonicalNameservers = strings.Split(s.cfg.CanonicalNameservers, ",") + for i := range s.cfg.canonicalNameservers { + s.cfg.canonicalNameservers[i] = dns.Fqdn(s.cfg.canonicalNameservers[i]) + } } if s.cfg.VanityIPs != "" {