app: improve region-locked error text and status code

I made a similar change for the Share button in but
didn't add it on the read side.

This also improves the error text with actionable advice.

Updates golang/go#18488.
Updates golang/go#16617.

Change-Id: Iee136c22c4e0fe52c302354123ea2baae58cfb4c
Reviewed-by: Brad Fitzpatrick <>
diff --git a/app/goplay/edit.go b/app/goplay/edit.go
index c7e2cbb..25eb9db 100644
--- a/app/goplay/edit.go
+++ b/app/goplay/edit.go
@@ -36,7 +36,8 @@
 	snip := &Snippet{Body: []byte(hello)}
 	if strings.HasPrefix(r.URL.Path, "/p/") {
 		if !allowShare(r) {
-			http.Error(w, "Forbidden", http.StatusForbidden)
+			msg := `<h1>Unavailable For Legal Reasons</h1><p>If you believe this is in error, please <a href="">file an issue</a>.</p>`
+			http.Error(w, msg, http.StatusUnavailableForLegalReasons)
 		c := appengine.NewContext(r)