aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index e934095b79..698f91b8ca 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -56,9 +56,9 @@ const (
func CorsHandler() func(next http.Handler) http.Handler {
if setting.CORSConfig.Enabled {
return cors.Handler(cors.Options{
- //Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option
+ // Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option
AllowedOrigins: setting.CORSConfig.AllowDomain,
- //setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
+ // setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
AllowedMethods: setting.CORSConfig.Methods,
AllowCredentials: setting.CORSConfig.AllowCredentials,
MaxAge: int(setting.CORSConfig.MaxAge.Seconds()),
@@ -459,7 +459,6 @@ func RegisterRoutes(m *web.Route) {
m.Post("/msteams/new", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost)
m.Post("/feishu/new", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksNewPost)
m.Post("/wechatwork/new", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksNewPost)
-
})
m.Group("/auths", func() {
@@ -691,7 +690,6 @@ func RegisterRoutes(m *web.Route) {
m.Post("/{lid}/unlock", repo.LFSUnlock)
})
})
-
}, func(ctx *context.Context) {
ctx.Data["PageIsSettings"] = true
ctx.Data["LFSStartServer"] = setting.LFS.StartServer
@@ -818,7 +816,6 @@ func RegisterRoutes(m *web.Route) {
m.Post("/delete", repo.DeleteBranchPost)
m.Post("/restore", repo.RestoreBranchPost)
}, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty)
-
}, reqSignIn, context.RepoAssignment, context.UnitTypes())
// Releases
@@ -857,7 +854,6 @@ func RegisterRoutes(m *web.Route) {
}
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
})
-
}, ignSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoReleaseReader)
// to maintain compatibility with old attachments
@@ -1085,5 +1081,4 @@ func RegisterRoutes(m *web.Route) {
ctx := context.GetContext(req)
ctx.NotFound("", nil)
})
-
}