Skip to content

Commit

Permalink
empty string is always in string
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Aug 2, 2024
1 parent 4e03f04 commit cb85784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ func GetHeadscaleConfig() (*Config, error) {
// - MagicDNS (BaseDomain) for users is on a *.ts.net domain per tailnet (e.g. tail-scale.ts.net)
//
// TODO(kradalby): remove dnsConfig.UserNameInMagicDNS check when removed.
if !dnsConfig.UserNameInMagicDNS && strings.Contains(serverURL, dnsConfig.BaseDomain) {
if !dnsConfig.UserNameInMagicDNS && dnsConfig.BaseDomain != "" && strings.Contains(serverURL, dnsConfig.BaseDomain) {
return nil, errors.New("server_url cannot contain the base_domain, this will cause the headscale server and embedded DERP to become unreachable from the Tailscale node.")
}

Expand Down

0 comments on commit cb85784

Please sign in to comment.