Skip to content

Commit

Permalink
golink: check for CertDomains before enabling HTTPS (#103)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
patrickod authored Dec 20, 2023
1 parent 3f822b6 commit 311ede6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion golink.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ out:
if err != nil {
return err
}
enableTLS := status.Self.HasCap(tailcfg.CapabilityHTTPS)
enableTLS := status.Self.HasCap(tailcfg.CapabilityHTTPS) && len(srv.CertDomains()) > 0
fqdn := strings.TrimSuffix(status.Self.DNSName, ".")

httpHandler := serveHandler()
Expand Down

0 comments on commit 311ede6

Please sign in to comment.