mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
merge
This commit is contained in:
commit
b73cf0ee77
3 changed files with 12 additions and 4 deletions
5
web.go
5
web.go
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/codegangsta/cli"
|
||||
"github.com/codegangsta/martini"
|
||||
"github.com/martini-contrib/render"
|
||||
"github.com/martini-contrib/sessions"
|
||||
|
||||
"github.com/gogits/gogs/routers"
|
||||
"github.com/gogits/gogs/routers/repo"
|
||||
|
@ -46,6 +47,10 @@ func runWeb(*cli.Context) {
|
|||
// Middleware.
|
||||
m.Use(render.Renderer(render.Options{Funcs: []template.FuncMap{AppHelpers}}))
|
||||
|
||||
// TODO: should use other store because cookie store is not secure.
|
||||
store := sessions.NewCookieStore([]byte("secret123"))
|
||||
m.Use(sessions.Sessions("my_session", store))
|
||||
|
||||
// Routers.
|
||||
m.Get("/", routers.Dashboard)
|
||||
m.Any("/login", user.SignIn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue