We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bdba9a commit 720b32aCopy full SHA for 720b32a
short.go
@@ -123,11 +123,10 @@ func (s *server) sHandler(w http.ResponseWriter, r *http.Request) {
123
// throw 50x. The server should be able to identify the issue.
124
log.Printf("stats err: %v\n", err)
125
// Use 307 redirect to 404 page
126
- http.Redirect(w, r, conf.Host+"/404.html", http.StatusTemporaryRedirect)
+ http.Redirect(w, r, "/404.html", http.StatusTemporaryRedirect)
127
}
128
}()
129
-
130
- alias := strings.TrimLeft(r.URL.Path, conf.S.Prefix)
+ alias := strings.TrimPrefix(r.URL.Path, conf.S.Prefix)
131
if alias == "" {
132
err = s.stats(ctx, w)
133
return
0 commit comments