@@ -54,10 +54,7 @@ import (
54
54
"github.com/prometheus/client_golang/prometheus"
55
55
)
56
56
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
61
58
62
59
// optionsCorsHandler return a http handler which sets CORS options if enabled by config, it blocks non-CORS OPTIONS requests.
63
60
func optionsCorsHandler () func (next http.Handler ) http.Handler {
@@ -1115,7 +1112,7 @@ func registerRoutes(m *web.Route) {
1115
1112
m .Post ("/cancel" , repo .MigrateCancelPost )
1116
1113
})
1117
1114
},
1118
- reqSignIn , context .RepoAssignment , context .RepoRef (), reqRepoAdmin ,
1115
+ reqSignIn , context .RepoAssignment , reqRepoAdmin , context .RepoRef (),
1119
1116
ctxDataSet ("PageIsRepoSettings" , true , "LFSStartServer" , setting .LFS .StartServer ),
1120
1117
)
1121
1118
// end "/{username}/{reponame}/settings"
@@ -1613,6 +1610,7 @@ func registerRoutes(m *web.Route) {
1613
1610
1614
1611
m .NotFound (func (w http.ResponseWriter , req * http.Request ) {
1615
1612
ctx := context .GetWebContext (req )
1613
+ routing .UpdateFuncInfo (ctx , routing .GetFuncInfo (ctx .NotFound , "GlobalNotFound" ))
1616
1614
ctx .NotFound ("" , nil )
1617
1615
})
1618
1616
}
0 commit comments