mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-09-30 14:06:48 +02:00
adds Client Hints support using env variable. (#98)
* adds Client Hints support using env variable. * Update processing_options.go Co-Authored-By: selul <marius.cristea@vertistudio.com> * improve client hints support based on the feedback * fix build error and remove redundant line in docs.
This commit is contained in:
committed by
Sergey Alexandrovich
parent
5bd97c42e7
commit
a1a74450d1
@@ -131,6 +131,7 @@ type config struct {
|
||||
|
||||
EnableWebpDetection bool
|
||||
EnforceWebp bool
|
||||
EnableClientHints bool
|
||||
|
||||
Key []byte
|
||||
Salt []byte
|
||||
@@ -221,6 +222,7 @@ func init() {
|
||||
|
||||
boolEnvConfig(&conf.EnableWebpDetection, "IMGPROXY_ENABLE_WEBP_DETECTION")
|
||||
boolEnvConfig(&conf.EnforceWebp, "IMGPROXY_ENFORCE_WEBP")
|
||||
boolEnvConfig(&conf.EnableClientHints, "IMGPROXY_ENABLE_CLIENT_HINTS")
|
||||
|
||||
hexEnvConfig(&conf.Key, "IMGPROXY_KEY")
|
||||
hexEnvConfig(&conf.Salt, "IMGPROXY_SALT")
|
||||
|
Reference in New Issue
Block a user