MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / NewDefaultConfig

Function NewDefaultConfig

server/config.go:65–85  ·  view source on GitHub ↗

NewDefaultConfig returns default config values

()

Source from the content-addressed store, hash-verified

63
64// NewDefaultConfig returns default config values
65func NewDefaultConfig() Config {
66 return Config{
67 Network: "tcp",
68 Bind: ":8080",
69 PathPrefix: "",
70 MaxClients: 2048,
71 RequestTimeout: 10 * time.Second,
72 ReadRequestTimeout: 10 * time.Second,
73 KeepAliveTimeout: 10 * time.Second,
74 GracefulStopTimeout: 20 * time.Second,
75 CORSAllowOrigin: "",
76 Secret: "",
77 DevelopmentErrorsMode: false,
78 SocketReusePort: false,
79 HealthCheckPath: "",
80 FreeMemoryInterval: 10 * time.Second,
81 LogMemStats: false,
82
83 ResponseWriter: responsewriter.NewDefaultConfig(),
84 }
85}
86
87// LoadConfigFromEnv overrides current values with environment variables
88func LoadConfigFromEnv(c *Config) (*Config, error) {

Callers 3

NewDefaultConfigFunction · 0.92
SetupSuiteMethod · 0.92
SetupTestMethod · 0.92

Calls 1

NewDefaultConfigFunction · 0.92

Tested by 2

SetupSuiteMethod · 0.74
SetupTestMethod · 0.74