mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Do not allow magicdns if not nameservers set up
This commit is contained in:
parent
ef0f7c0c09
commit
ec911981c2
1 changed files with 4 additions and 2 deletions
|
@ -108,8 +108,10 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) {
|
||||||
dnsConfig.Domains = viper.GetStringSlice("dns_config.domains")
|
dnsConfig.Domains = viper.GetStringSlice("dns_config.domains")
|
||||||
}
|
}
|
||||||
|
|
||||||
if viper.IsSet("dns_config.magic_dns") {
|
if len(dnsConfig.Nameservers) > 0 {
|
||||||
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
|
if viper.IsSet("dns_config.magic_dns") {
|
||||||
|
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var baseDomain string
|
var baseDomain string
|
||||||
|
|
Loading…
Reference in a new issue