diff options
Diffstat (limited to 'internal/cmd/web.go')
-rw-r--r-- | internal/cmd/web.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/cmd/web.go b/internal/cmd/web.go index 84c99184..f26c5a51 100644 --- a/internal/cmd/web.go +++ b/internal/cmd/web.go @@ -41,6 +41,7 @@ import ( "gogs.io/gogs/internal/route/admin" apiv1 "gogs.io/gogs/internal/route/api/v1" "gogs.io/gogs/internal/route/dev" + "gogs.io/gogs/internal/route/lfs" "gogs.io/gogs/internal/route/org" "gogs.io/gogs/internal/route/repo" "gogs.io/gogs/internal/route/user" @@ -648,11 +649,14 @@ func runWeb(c *cli.Context) error { // e.g. with or without ".git" suffix. m.Group("/:reponame([\\d\\w-_\\.]+\\.git$)", func() { m.Get("", ignSignIn, context.RepoAssignment(), context.RepoRef(), repo.Home) - m.Options("/*", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) - m.Route("/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) + + m.Group("/info/lfs", func() { + lfs.RegisterRoutes(m.Router) + }, ignSignInAndCsrf) + + m.Route("/*", "GET,POST,OPTIONS", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) }) - m.Options("/:reponame/*", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) - m.Route("/:reponame/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) + m.Route("/:reponame/*", "GET,POST,OPTIONS", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP) }) // ***** END: Repository ***** |