This commit is contained in:
lealife
2017-11-30 20:15:28 +08:00
parent bba9030f14
commit 6cbb82a927
34 changed files with 51 additions and 126 deletions

0
cmd/leanote_revel/skeleton/app/controllers/app.go Executable file → Normal file
View File

8
cmd/leanote_revel/skeleton/app/init.go Executable file → Normal file
View 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")

0
cmd/leanote_revel/skeleton/app/views/App/Index.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/debug.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/errors/404.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/errors/500.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/flash.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/footer.html Executable file → Normal file
View File

0
cmd/leanote_revel/skeleton/app/views/header.html Executable file → Normal file
View File