mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Removed the catch all route, and added comment about security issue
This commit is contained in:
@@ -38,9 +38,8 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HeaderFilter adds common security headers
|
// HeaderFilter adds common security headers
|
||||||
// TODO turn this into revel.HeaderFilter
|
// There is a full implementation of a CSRF filter in
|
||||||
// should probably also have a filter for CSRF
|
// https://github.com/revel/modules/tree/master/csrf
|
||||||
// not sure if it can go in the same filter or not
|
|
||||||
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
|
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
|
||||||
c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
|
c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
|
||||||
c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
|
c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||||
|
|||||||
@@ -15,5 +15,12 @@ GET /favicon.ico 404
|
|||||||
# Map static resources from the /app/public folder to the /public path
|
# Map static resources from the /app/public folder to the /public path
|
||||||
GET /public/*filepath Static.Serve("public")
|
GET /public/*filepath Static.Serve("public")
|
||||||
|
|
||||||
# Catch all
|
# Catch all, this will route any request into the controller path
|
||||||
* /:controller/:action :controller.:action
|
#
|
||||||
|
# **** WARNING ****
|
||||||
|
# Enabling this exposes any controller and function to the web.
|
||||||
|
# ** This is a serious security issue if used online **
|
||||||
|
#
|
||||||
|
# For rapid development uncomment the following to add new controller.action endpoints
|
||||||
|
# without having to add them to the routes table.
|
||||||
|
# * /:controller/:action :controller.:action
|
||||||
|
|||||||
Reference in New Issue
Block a user