cmd/golangorg: fix, restore tip.golang.org tests

The golang.org health check was failing the tip.golang.org tests
because the host enforcer was redirecting an unknown subdomain
to golang.org. Make tip a known subdomain to fix the tests, and
then restore them.

(The standard tip.golang.org setup disables the enforcer instead.)

Change-Id: Id15e7bcb3a704b7782e132c4303576f9d3e80cb0
Reviewed-on: https://go-review.googlesource.com/c/website/+/334112
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
diff --git a/cmd/golangorg/server.go b/cmd/golangorg/server.go
index 3261443..dbb8b63 100644
--- a/cmd/golangorg/server.go
+++ b/cmd/golangorg/server.go
@@ -224,6 +224,7 @@
 var validHosts = map[string]bool{
 	"golang.org":       true,
 	"golang.google.cn": true,
+	"tip.golang.org":   true,
 }
 
 // hostEnforcerHandler redirects http://foo.golang.org/bar to https://golang.org/bar.
diff --git a/cmd/golangorg/testdata/web.txt b/cmd/golangorg/testdata/web.txt
index 1fbb0a6..addbf91 100644
--- a/cmd/golangorg/testdata/web.txt
+++ b/cmd/golangorg/testdata/web.txt
@@ -98,6 +98,9 @@
 GET https://golang.org/pkg/
 redirect == https://pkg.go.dev/std
 
+GET https://tip.golang.org/pkg/
+redirect == https://pkg.go.dev/std@master
+
 GET https://golang.org/pkg?m=old
 redirect == /pkg/?m=old
 
@@ -119,6 +122,9 @@
 GET https://golang.org/pkg/bufio/?GOOS=windows&GOARCH=amd64
 redirect == https://pkg.go.dev/bufio?GOOS=windows&GOARCH=amd64
 
+GET https://tip.golang.org/pkg/bufio/
+redirect == https://pkg.go.dev/bufio@master
+
 GET https://golang.org/pkg/bufio/?m=old
 body contains href="/pkg/io/?m=old#Writer
 body !contains href="/pkg/io/#Writer