cmd
This commit is contained in:
1 parent
bba9030f14
commit
6cbb82a927
34 files changed
+51
-126
No files matched your search
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+3
-5
@@ -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")
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+12
-63
@@ -84,15 +84,6 @@ format.datetime = 2006-01-02 15:04
|
||||
results.chunked = false
|
||||
|
||||
|
||||
# Prefixes for each log message line.
|
||||
# User can override these prefix values within any section
|
||||
# For e.g: [dev], [prod], etc
|
||||
log.trace.prefix = "TRACE "
|
||||
log.info.prefix = "INFO "
|
||||
log.warn.prefix = "WARN "
|
||||
log.error.prefix = "ERROR "
|
||||
|
||||
|
||||
# The default language of this application.
|
||||
i18n.default_language = en
|
||||
|
||||
@@ -104,7 +95,7 @@ i18n.default_language = en
|
||||
# Module to serve static content such as CSS, JavaScript and Media files
|
||||
# Allows Routes like this:
|
||||
# `Static.ServeModule("modulename","public")`
|
||||
module.static=github.com/revel/modules/static
|
||||
module.static = github.com/revel/modules/static
|
||||
|
||||
|
||||
|
||||
@@ -179,37 +170,14 @@ module.testrunner = github.com/revel/modules/testrunner
|
||||
# Log to Os's standard error output. Default value.
|
||||
# "relative/path/to/log"
|
||||
# Log to file.
|
||||
log.trace.output = off
|
||||
log.info.output = stderr
|
||||
log.warn.output = stderr
|
||||
log.error.output = stderr
|
||||
|
||||
|
||||
# Revel log flags. Possible flags defined by the Go `log` package. Go log is
|
||||
# "Bits OR'ed together to control what's printed
|
||||
# See:
|
||||
# https://golang.org/pkg/log/#pkg-constants
|
||||
# Values:
|
||||
# "0"
|
||||
# Just log the message, turn off the flags.
|
||||
# "3"
|
||||
# log.LstdFlags (log.Ldate|log.Ltime)
|
||||
# "19"
|
||||
# log.Ldate|log.Ltime|log.Lshortfile
|
||||
# "23"
|
||||
# log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile
|
||||
log.trace.flags = 19
|
||||
log.info.flags = 19
|
||||
log.warn.flags = 19
|
||||
log.error.flags = 19
|
||||
|
||||
log.all.filter.module.app = stdout # Log all loggers for the application to the stdout
|
||||
log.error.nfilter.module.app = stderr # Everything else that logs an error to stderr
|
||||
log.crit.output = stderr # Everything that logs something as critical goes to this
|
||||
|
||||
# Revel request access log
|
||||
# Access log line format:
|
||||
# RequestStartTime ClientIP ResponseStatus RequestLatency HTTPMethod URLPath
|
||||
# Sample format:
|
||||
# 2016/05/25 17:46:37.112 127.0.0.1 200 270.157µs GET /
|
||||
log.request.output = stderr
|
||||
# INFO 21:53:55 static server-engine.go:169: Request Stats ip=127.0.0.1 path=/public/vendors/datatables.net-buttons/js/buttons.html5.min.js method=GET start=2017/08/31 21:53:55 status=200 duration_seconds=0.0002583 section=requestlog
|
||||
log.request.output = stdout
|
||||
|
||||
|
||||
|
||||
@@ -229,30 +197,11 @@ watch = false
|
||||
|
||||
module.testrunner =
|
||||
|
||||
log.trace.output = off
|
||||
log.info.output = off
|
||||
log.warn.output = log/%(app.name)s.log
|
||||
log.error.output = log/%(app.name)s.log
|
||||
log.warn.output = log/%(app.name)-warn.json # Log all warn messages to file
|
||||
log.error.output = log/%(app.name)-error.json # Log all errors to file
|
||||
log.crit.output = log/%(app.name)-critical.json # Log all critical to file
|
||||
|
||||
# Revel log flags. Possible flags defined by the Go `log` package,
|
||||
# please refer https://golang.org/pkg/log/#pkg-constants
|
||||
# Go log is "Bits or'ed together to control what's printed"
|
||||
# Examples:
|
||||
# 0 => just log the message, turn off the flags
|
||||
# 3 => log.LstdFlags (log.Ldate|log.Ltime)
|
||||
# 19 => log.Ldate|log.Ltime|log.Lshortfile
|
||||
# 23 => log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile
|
||||
log.trace.flags = 3
|
||||
log.info.flags = 3
|
||||
log.warn.flags = 3
|
||||
log.error.flags = 3
|
||||
|
||||
|
||||
# Revel request access log
|
||||
# Access log line format:
|
||||
# RequestStartTime ClientIP ResponseStatus RequestLatency HTTPMethod URLPath
|
||||
# Sample format:
|
||||
# 2016/05/25 17:46:37.112 127.0.0.1 200 270.157µs GET /
|
||||
# Revel request access log (json format)
|
||||
# Example:
|
||||
# log.request.output = %(app.name)s-request.log
|
||||
log.request.output = off
|
||||
# log.request.output = %(app.name)s-request.json
|
||||
log.request.output = log/%(app.name)s-requests.json
|
||||
Executable → Regular
+9
-2
@@ -15,5 +15,12 @@ GET /favicon.ico 404
|
||||
# Map static resources from the /app/public folder to the /public path
|
||||
GET /public/*filepath Static.Serve("public")
|
||||
|
||||
# Catch all
|
||||
* /:controller/:action :controller.:action
|
||||
# Catch all, this will route any request into the controller path
|
||||
#
|
||||
# **** 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
|
||||
Executable → Regular
File mode changed.
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
File mode changed.
File mode changed.
Executable → Regular
File mode changed.
Reference in new issue
Block a user