tsnet: add CertDomains helper (#7533)

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-03-11 13:12:57 -08:00
committed by GitHub
parent e109cf9fdd
commit 958c89470b
2 changed files with 18 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ func main() {
}
defer ln.Close()
fmt.Printf("Listening on https://%v\n", s.CertDomains()[0])
err = http.Serve(ln, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "<html><body><h1>Hello, internet!</h1>")
}))