mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-15 07:27:30 +00:00
cmd/tailscale/cli: revert key for web config for services to FQDN (#16627)
This commit reverts the key of Web field in ipn.ServiceConfig to use FQDN instead of service name for the host part of HostPort. This change is because k8s operator already build base on the assumption of the part being FQDN. We don't want to break the code with dependency. Fixes tailscale/corp#30695 Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
This commit is contained in:
@@ -1014,7 +1014,9 @@ func (b *LocalBackend) webServerConfig(hostname string, forVIPService tailcfg.Se
|
||||
return c, false
|
||||
}
|
||||
if forVIPService != "" {
|
||||
key := ipn.HostPort(net.JoinHostPort(forVIPService.WithoutPrefix(), fmt.Sprintf("%d", port)))
|
||||
magicDNSSuffix := b.currentNode().NetMap().MagicDNSSuffix()
|
||||
fqdn := strings.Join([]string{forVIPService.WithoutPrefix(), magicDNSSuffix}, ".")
|
||||
key := ipn.HostPort(net.JoinHostPort(fqdn, fmt.Sprintf("%d", port)))
|
||||
return b.serveConfig.FindServiceWeb(forVIPService, key)
|
||||
}
|
||||
key := ipn.HostPort(net.JoinHostPort(hostname, fmt.Sprintf("%d", port)))
|
||||
|
Reference in New Issue
Block a user