diff options
Diffstat (limited to 'app/init.go')
| -rw-r--r-- | app/init.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/init.go b/app/init.go index 2305d73..b13043a 100644 --- a/app/init.go +++ b/app/init.go @@ -1,6 +1,10 @@ package app -import "github.com/revel/revel" +import ( + "github.com/anonx/cachesession" + "github.com/cbonello/revel-csrf" + "github.com/revel/revel" +) func init() { // Filters is the default set of global filters. @@ -9,8 +13,9 @@ func init() { revel.RouterFilter, // Use the routing table to select the right Action revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters. revel.ParamsFilter, // Parse parameters into Controller.Params. - revel.SessionFilter, // Restore and write the session cookie. + cachesession.Filter, // Restore and write the session cookie. revel.FlashFilter, // Restore and write the flash cookie. + csrf.CSRFFilter, // CSRF protection revel.ValidationFilter, // Restore kept validation errors and save new ones from cookie. revel.I18nFilter, // Resolve the requested language HeaderFilter, // Add some security based headers |
