Skip to content

Commit ae02058

Browse files
committed
Return go-get info on subdirs. Fixes #15625
1 parent 3d5bb3e commit ae02058

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

routers/routes/web.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,13 @@ func RegisterRoutes(m *web.Route) {
11281128

11291129
m.Head("/tasks/trigger", repo.TriggerTask)
11301130
})
1131+
m.Get("/{reponame}/*", func(ctx *context.Context) {
1132+
if ctx.Query("go-get") != "1" {
1133+
ctx.NotFound("", nil)
1134+
web.Wrap(routers.NotFound)
1135+
}
1136+
}, goGet)
1137+
11311138
})
11321139
// ***** END: Repository *****
11331140

0 commit comments

Comments
 (0)