forked from hidevopsio/hiboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaultconfig.go
33 lines (30 loc) · 1.26 KB
/
defaultconfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package web
import "github.com/kataras/iris"
// DefaultConfiguration returns the default configuration for an iris station, fills the main Configuration
func defaultConfiguration() iris.Configuration {
return iris.Configuration{
DisableStartupLog: false,
DisableInterruptHandler: false,
DisableVersionChecker: true,
DisablePathCorrection: false,
EnablePathEscape: false,
FireMethodNotAllowed: false,
DisableBodyConsumptionOnUnmarshal: false,
DisableAutoFireStatusCode: false,
TimeFormat: "Mon, Jan 02 2006 15:04:05 GMT",
Charset: "UTF-8",
// PostMaxMemory is for post body max memory.
//
// The request body the size limit
// can be set by the middleware `LimitRequestBodySize`
// or `context#SetMaxRequestBodySize`.
PostMaxMemory: 32 << 20, // 32MB
TranslateFunctionContextKey: "app.translate",
TranslateLanguageContextKey: "app.language",
ViewLayoutContextKey: "app.viewLayout",
ViewDataContextKey: "app.viewData",
RemoteAddrHeaders: make(map[string]bool),
EnableOptimizations: false,
Other: make(map[string]interface{}),
}
}