|
@@ -140,6 +140,8 @@ type config struct {
|
|
|
|
|
|
AllowOrigin string
|
|
AllowOrigin string
|
|
|
|
|
|
|
|
+ UserAgent string
|
|
|
|
+
|
|
IgnoreSslVerification bool
|
|
IgnoreSslVerification bool
|
|
|
|
|
|
LocalFileSystemRoot string
|
|
LocalFileSystemRoot string
|
|
@@ -176,6 +178,7 @@ var conf = config{
|
|
AllowInsecure: false,
|
|
AllowInsecure: false,
|
|
Quality: 80,
|
|
Quality: 80,
|
|
GZipCompression: 5,
|
|
GZipCompression: 5,
|
|
|
|
+ UserAgent: fmt.Sprintf("imgproxy/%s", version),
|
|
ETagEnabled: false,
|
|
ETagEnabled: false,
|
|
S3Enabled: false,
|
|
S3Enabled: false,
|
|
WatermarkOpacity: 1,
|
|
WatermarkOpacity: 1,
|
|
@@ -227,6 +230,8 @@ func init() {
|
|
|
|
|
|
strEnvConfig(&conf.AllowOrigin, "IMGPROXY_ALLOW_ORIGIN")
|
|
strEnvConfig(&conf.AllowOrigin, "IMGPROXY_ALLOW_ORIGIN")
|
|
|
|
|
|
|
|
+ strEnvConfig(&conf.UserAgent, "IMGPROXY_USER_AGENT")
|
|
|
|
+
|
|
boolEnvConfig(&conf.IgnoreSslVerification, "IMGPROXY_IGNORE_SSL_VERIFICATION")
|
|
boolEnvConfig(&conf.IgnoreSslVerification, "IMGPROXY_IGNORE_SSL_VERIFICATION")
|
|
|
|
|
|
strEnvConfig(&conf.LocalFileSystemRoot, "IMGPROXY_LOCAL_FILESYSTEM_ROOT")
|
|
strEnvConfig(&conf.LocalFileSystemRoot, "IMGPROXY_LOCAL_FILESYSTEM_ROOT")
|