Added CSRF.
This commit is contained in:
parent
1f258ea17e
commit
60d434a922
4 changed files with 14 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ func BuildRouter(c *container.Container) {
|
|||
// TODO: needs cache control headers
|
||||
c.Web.Use(middleware.Static(StaticDir))
|
||||
c.Web.Use(session.Middleware(sessions.NewCookieStore([]byte(c.Config.App.EncryptionKey))))
|
||||
c.Web.Use(middleware.CSRFWithConfig(middleware.CSRFConfig{
|
||||
TokenLookup: "form:csrf",
|
||||
}))
|
||||
|
||||
// Base controller
|
||||
ctr := controllers.NewController(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue