Skip to content

Commit cd9066f

Browse files
committed
fix
1 parent ffc9879 commit cd9066f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

routers/web/web.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ import (
5454
"github.com/prometheus/client_golang/prometheus"
5555
)
5656

57-
const (
58-
// GzipMinSize represents min size to compress for the body size of response
59-
GzipMinSize = 1400
60-
)
57+
const GzipMinSize = 1400 // min size to compress for the body size of response
6158

6259
// optionsCorsHandler return a http handler which sets CORS options if enabled by config, it blocks non-CORS OPTIONS requests.
6360
func optionsCorsHandler() func(next http.Handler) http.Handler {
@@ -1115,7 +1112,7 @@ func registerRoutes(m *web.Route) {
11151112
m.Post("/cancel", repo.MigrateCancelPost)
11161113
})
11171114
},
1118-
reqSignIn, context.RepoAssignment, context.RepoRef(), reqRepoAdmin,
1115+
reqSignIn, context.RepoAssignment, reqRepoAdmin, context.RepoRef(),
11191116
ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer),
11201117
)
11211118
// end "/{username}/{reponame}/settings"
@@ -1613,6 +1610,7 @@ func registerRoutes(m *web.Route) {
16131610

16141611
m.NotFound(func(w http.ResponseWriter, req *http.Request) {
16151612
ctx := context.GetWebContext(req)
1613+
routing.UpdateFuncInfo(ctx, routing.GetFuncInfo(ctx.NotFound, "GlobalNotFound"))
16161614
ctx.NotFound("", nil)
16171615
})
16181616
}

0 commit comments

Comments
 (0)