Add IMGPROXY_DISABLE_SHRINK_ON_LOAD config

This commit is contained in:
DarthSim
2019-04-01 21:30:53 +06:00
parent 550b9edb20
commit c864f801d0
3 changed files with 15 additions and 12 deletions

View File

@@ -152,6 +152,8 @@ type config struct {
EnforceWebp bool
EnableClientHints bool
DisableShrinkOnLoad bool
Keys []securityKey
Salts []securityKey
AllowInsecure bool
@@ -267,6 +269,8 @@ func init() {
boolEnvConfig(&conf.EnforceWebp, "IMGPROXY_ENFORCE_WEBP")
boolEnvConfig(&conf.EnableClientHints, "IMGPROXY_ENABLE_CLIENT_HINTS")
boolEnvConfig(&conf.DisableShrinkOnLoad, "IMGPROXY_DISABLE_SHRINK_ON_LOAD")
hexEnvConfig(&conf.Keys, "IMGPROXY_KEY")
hexEnvConfig(&conf.Salts, "IMGPROXY_SALT")
intEnvConfig(&conf.SignatureSize, "IMGPROXY_SIGNATURE_SIZE")