mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 21:03:56 +01:00
Fix #464
This commit is contained in:
parent
632b1b694d
commit
0f037b430a
1 changed files with 4 additions and 6 deletions
10
cmd/web.go
10
cmd/web.go
|
@ -124,7 +124,7 @@ func runWeb(*cli.Context) {
|
||||||
|
|
||||||
// Routers.
|
// Routers.
|
||||||
m.Get("/", ignSignIn, routers.Home)
|
m.Get("/", ignSignIn, routers.Home)
|
||||||
m.Get("/explore", routers.Explore)
|
m.Get("/explore", ignSignIn, routers.Explore)
|
||||||
m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install)
|
m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install)
|
||||||
m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost)
|
m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost)
|
||||||
m.Group("", func(r *macaron.Router) {
|
m.Group("", func(r *macaron.Router) {
|
||||||
|
@ -355,11 +355,9 @@ func runWeb(*cli.Context) {
|
||||||
}, ignSignIn, middleware.RepoAssignment(true, true))
|
}, ignSignIn, middleware.RepoAssignment(true, true))
|
||||||
|
|
||||||
m.Group("/:username", func(r *macaron.Router) {
|
m.Group("/:username", func(r *macaron.Router) {
|
||||||
r.Get("/:reponame", middleware.RepoAssignment(true, true, true), repo.Home)
|
r.Get("/:reponame", ignSignIn, middleware.RepoAssignment(true, true, true), repo.Home)
|
||||||
m.Group("/:reponame", func(r *macaron.Router) {
|
r.Any("/:reponame/*", ignSignInAndCsrf, repo.Http)
|
||||||
r.Any("/*", repo.Http)
|
})
|
||||||
})
|
|
||||||
}, ignSignInAndCsrf)
|
|
||||||
|
|
||||||
// Not found handler.
|
// Not found handler.
|
||||||
m.NotFound(routers.NotFound)
|
m.NotFound(routers.NotFound)
|
||||||
|
|
Loading…
Reference in a new issue