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 1f21ac4 commit 862be19Copy full SHA for 862be19
controller/index.go
@@ -5,6 +5,7 @@ import (
5
"io"
6
"io/fs"
7
"net/http"
8
+ "strings"
9
10
"github.com/caarlos0/httperr"
11
)
@@ -17,7 +18,8 @@ func Index(fsys fs.FS, version string) http.Handler {
17
18
19
func HandleForm(fsys fs.FS) http.HandlerFunc {
20
return func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, "/"+r.FormValue("repository"), http.StatusSeeOther)
21
+ repo := strings.TrimPrefix(r.FormValue("repository"), "https://github.com/")
22
+ http.Redirect(w, r, repo, http.StatusSeeOther)
23
}
24
25
0 commit comments