cmd
This commit is contained in:
8
cmd/leanote_revel/skeleton/app/init.go
Executable file → Normal file
8
cmd/leanote_revel/skeleton/app/init.go
Executable file → Normal file
@ -29,8 +29,7 @@ func init() {
|
||||
revel.ActionInvoker, // Invoke the action.
|
||||
}
|
||||
|
||||
|
||||
// register startup functions with OnAppStart
|
||||
// Register startup functions with OnAppStart
|
||||
// revel.DevMode and revel.RunMode only work inside of OnAppStart. See Example Startup Script
|
||||
// ( order dependent )
|
||||
// revel.OnAppStart(ExampleStartupScript)
|
||||
@ -39,9 +38,8 @@ func init() {
|
||||
}
|
||||
|
||||
// HeaderFilter adds common security headers
|
||||
// TODO turn this into revel.HeaderFilter
|
||||
// should probably also have a filter for CSRF
|
||||
// not sure if it can go in the same filter or not
|
||||
// There is a full implementation of a CSRF filter in
|
||||
// https://github.com/revel/modules/tree/master/csrf
|
||||
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
|
||||
c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
|
||||
c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||
|
Reference in New Issue
Block a user