Skip to content

Commit 311ede6

Browse files
authored
golink: check for CertDomains before enabling HTTPS (#103)
Fixes #102 Ensure that we have CertDomains for the HTTPS listener before asking tsnet to create one. Signed-off-by: Patrick O'Doherty <[email protected]>
1 parent 3f822b6 commit 311ede6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

golink.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ out:
189189
if err != nil {
190190
return err
191191
}
192-
enableTLS := status.Self.HasCap(tailcfg.CapabilityHTTPS)
192+
enableTLS := status.Self.HasCap(tailcfg.CapabilityHTTPS) && len(srv.CertDomains()) > 0
193193
fqdn := strings.TrimSuffix(status.Self.DNSName, ".")
194194

195195
httpHandler := serveHandler()

0 commit comments

Comments
 (0)