DefaultConfiguration returns the default configuration for an iris station, fills the main Configuration
()
| 1395 | |
| 1396 | // DefaultConfiguration returns the default configuration for an iris station, fills the main Configuration |
| 1397 | func DefaultConfiguration() Configuration { |
| 1398 | return Configuration{ |
| 1399 | LogLevel: "info", |
| 1400 | SocketSharding: false, |
| 1401 | KeepAlive: 0, |
| 1402 | Timeout: 0, |
| 1403 | TimeoutMessage: DefaultTimeoutMessage, |
| 1404 | NonBlocking: false, |
| 1405 | DisableStartupLog: false, |
| 1406 | DisableInterruptHandler: false, |
| 1407 | DisablePathCorrection: false, |
| 1408 | EnablePathEscape: false, |
| 1409 | ForceLowercaseRouting: false, |
| 1410 | FireMethodNotAllowed: false, |
| 1411 | DisableBodyConsumptionOnUnmarshal: false, |
| 1412 | FireEmptyFormError: false, |
| 1413 | DisableAutoFireStatusCode: false, |
| 1414 | ResetOnFireErrorCode: false, |
| 1415 | URLParamSeparator: toStringPtr(","), |
| 1416 | TimeFormat: "Mon, 02 Jan 2006 15:04:05 GMT", |
| 1417 | Charset: "utf-8", |
| 1418 | |
| 1419 | // PostMaxMemory is for post body max memory. |
| 1420 | // |
| 1421 | // The request body the size limit |
| 1422 | // can be set by the middleware `LimitRequestBodySize` |
| 1423 | // or `context#SetMaxRequestBodySize`. |
| 1424 | PostMaxMemory: 32 << 20, // 32MB |
| 1425 | LocaleContextKey: "iris.locale", |
| 1426 | LanguageContextKey: "iris.locale.language", |
| 1427 | LanguageInputContextKey: "iris.locale.language.input", |
| 1428 | VersionContextKey: "iris.api.version", |
| 1429 | VersionAliasesContextKey: "iris.api.version.aliases", |
| 1430 | ViewEngineContextKey: "iris.view.engine", |
| 1431 | ViewLayoutContextKey: "iris.view.layout", |
| 1432 | ViewDataContextKey: "iris.view.data", |
| 1433 | FallbackViewContextKey: "iris.view.fallback", |
| 1434 | RemoteAddrHeaders: nil, |
| 1435 | RemoteAddrHeadersForce: false, |
| 1436 | RemoteAddrPrivateSubnets: []netutil.IPRange{ |
| 1437 | { |
| 1438 | Start: "10.0.0.0", |
| 1439 | End: "10.255.255.255", |
| 1440 | }, |
| 1441 | { |
| 1442 | Start: "100.64.0.0", |
| 1443 | End: "100.127.255.255", |
| 1444 | }, |
| 1445 | { |
| 1446 | Start: "172.16.0.0", |
| 1447 | End: "172.31.255.255", |
| 1448 | }, |
| 1449 | { |
| 1450 | Start: "192.0.0.0", |
| 1451 | End: "192.0.0.255", |
| 1452 | }, |
| 1453 | { |
| 1454 | Start: "192.168.0.0", |
searching dependent graphs…