mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 17:57:37 +00:00
Do not allow magicdns if not nameservers set up
This commit is contained in:
@@ -108,8 +108,10 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) {
|
||||
dnsConfig.Domains = viper.GetStringSlice("dns_config.domains")
|
||||
}
|
||||
|
||||
if viper.IsSet("dns_config.magic_dns") {
|
||||
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
|
||||
if len(dnsConfig.Nameservers) > 0 {
|
||||
if viper.IsSet("dns_config.magic_dns") {
|
||||
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
|
||||
}
|
||||
}
|
||||
|
||||
var baseDomain string
|
||||
|
Reference in New Issue
Block a user