8000 chore: remove unused redir · soulteary/golang-playground@d7982da · GitHub
[go: up one dir, main page]

Skip to content

Commit d7982da

Browse files
committed
chore: remove unused redir
1 parent a04e72b commit d7982da

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/edit.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,8 @@ func (s *server) handleEdit(w http.ResponseWriter, r *http.Request) {
2828
return
2929
}
3030

31-
// Redirect foo.play.golang.org to play.golang.org.
32-
if strings.HasSuffix(r.Host, "."+hostname) {
33-
http.Redirect(w, r, "https://"+hostname, http.StatusFound)
34-
return
35-
}
36-
3731
snip := &snippet{Body: []byte(s.examples.hello())}
3832

39-
if r.Host == hostname {
40-
// The main playground is now on go.dev/play.
41-
http.Redirect(w, r, "https://go.dev/play"+r.URL.Path, http.StatusFound)
42-
return
43-
}
44-
4533
w.Header().Set("Content-Type", "text/html; charset=utf-8")
4634
data := &editData{
4735
Snippet: snip,

src/edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
</script>
6363
</head>
64-
<body itemscope itemtype="http://schema.org/CreativeWork">
64+
<body>
6565
<div id="banner">
6666
<div id="head" itemprop="name">The Go Playground</div>
6767
<input type="button" value="运行" id="run">

0 commit comments

Comments
 (0)
0