1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Fixed error on assign

This commit is contained in:
Juan Font Alonso 2021-10-02 13:03:08 +02:00
parent 36ae14bccf
commit 19492650d4
2 changed files with 2 additions and 1 deletions

2
api.go
View File

@ -249,7 +249,7 @@ func (h *Headscale) getMapResponse(mKey wgkey.Key, req tailcfg.MapRequest, m Mac
if err != nil {
return nil, err
}
dnsConfig := h.cfg.DNSConfig.Clone()
dnsConfig = h.cfg.DNSConfig.Clone()
for _, ns := range *namespaces {
dnsConfig.Domains = append(dnsConfig.Domains, fmt.Sprintf("%s.%s", ns.Name, h.cfg.BaseDomain))
}

View File

@ -118,6 +118,7 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) {
} else {
baseDomain = "headscale.net" // does not really matter when MagicDNS is not enabled
}
return dnsConfig, baseDomain
}