mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-02 11:34:20 +02:00
Remove falsey params from config init since they are false by default; Move presets initialization to config init
This commit is contained in:
parent
a16a1e3141
commit
9e0a563d81
@ -215,17 +215,14 @@ var conf = config{
|
|||||||
DownloadTimeout: 5,
|
DownloadTimeout: 5,
|
||||||
Concurrency: runtime.NumCPU() * 2,
|
Concurrency: runtime.NumCPU() * 2,
|
||||||
TTL: 3600,
|
TTL: 3600,
|
||||||
IgnoreSslVerification: false,
|
|
||||||
MaxSrcResolution: 16800000,
|
MaxSrcResolution: 16800000,
|
||||||
MaxGifFrames: 1,
|
MaxGifFrames: 1,
|
||||||
AllowInsecure: false,
|
|
||||||
SignatureSize: 32,
|
SignatureSize: 32,
|
||||||
PngQuantizationColors: 256,
|
PngQuantizationColors: 256,
|
||||||
Quality: 80,
|
Quality: 80,
|
||||||
GZipCompression: 5,
|
GZipCompression: 5,
|
||||||
UserAgent: fmt.Sprintf("imgproxy/%s", version),
|
UserAgent: fmt.Sprintf("imgproxy/%s", version),
|
||||||
ETagEnabled: false,
|
Presets: make(presets),
|
||||||
S3Enabled: false,
|
|
||||||
WatermarkOpacity: 1,
|
WatermarkOpacity: 1,
|
||||||
BugsnagStage: "production",
|
BugsnagStage: "production",
|
||||||
HoneybadgerEnv: "production",
|
HoneybadgerEnv: "production",
|
||||||
@ -233,7 +230,6 @@ var conf = config{
|
|||||||
SentryRelease: fmt.Sprintf("imgproxy/%s", version),
|
SentryRelease: fmt.Sprintf("imgproxy/%s", version),
|
||||||
FreeMemoryInterval: 10,
|
FreeMemoryInterval: 10,
|
||||||
BufferPoolCalibrationThreshold: 1024,
|
BufferPoolCalibrationThreshold: 1024,
|
||||||
OnlyPresets: false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -310,7 +306,6 @@ func init() {
|
|||||||
|
|
||||||
strEnvConfig(&conf.BaseURL, "IMGPROXY_BASE_URL")
|
strEnvConfig(&conf.BaseURL, "IMGPROXY_BASE_URL")
|
||||||
|
|
||||||
conf.Presets = make(presets)
|
|
||||||
presetEnvConfig(conf.Presets, "IMGPROXY_PRESETS")
|
presetEnvConfig(conf.Presets, "IMGPROXY_PRESETS")
|
||||||
presetFileConfig(conf.Presets, *presetsPath)
|
presetFileConfig(conf.Presets, *presetsPath)
|
||||||
boolEnvConfig(&conf.OnlyPresets, "IMGPROXY_ONLY_PRESETS")
|
boolEnvConfig(&conf.OnlyPresets, "IMGPROXY_ONLY_PRESETS")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user