Skip to content

Commit c8b63a4

Browse files
committed
cmd/hello: also redirect https://hello.ipn.dev to hello.ts.net
I apparently only did HTTP before, not HTTPS. Updates tailscale/corp#1327 Change-Id: I7d5265a0a25fcab5b142c8c3f21a0920f6cae39f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 parent a201b89 commit c8b63a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/hello/hello.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ func root(w http.ResponseWriter, r *http.Request) {
161161
http.Redirect(w, r, "/", http.StatusFound)
162162
return
163163
}
164+
if r.TLS != nil && *httpsAddr != "" && strings.Contains(r.Host, "hello.ipn.dev") {
165+
http.Redirect(w, r, "https://hello.ts.net", http.StatusFound)
166+
return
167+
}
164168
tmpl, err := getTmpl()
165169
if err != nil {
166170
w.Header().Set("Content-Type", "text/plain")

0 commit comments

Comments
 (0)