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

Function LoadFallbackStaticConfigFromEnv

auximageprovider/static_config.go:46–54  ·  view source on GitHub ↗

LoadFallbackStaticConfigFromEnv loads the fallback configuration from the environment

(c *StaticConfig)

Source from the content-addressed store, hash-verified

44
45// LoadFallbackStaticConfigFromEnv loads the fallback configuration from the environment
46func LoadFallbackStaticConfigFromEnv(c *StaticConfig) (*StaticConfig, error) {
47 c = ensure.Ensure(c, NewDefaultStaticConfig)
48
49 IMGPROXY_FALLBACK_IMAGE_DATA.Parse(&c.Base64Data)
50 IMGPROXY_FALLBACK_IMAGE_PATH.Parse(&c.Path)
51 IMGPROXY_FALLBACK_IMAGE_URL.Parse(&c.URL)
52
53 return c, nil
54}

Callers 1

LoadConfigFromEnvFunction · 0.92

Calls 2

EnsureFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected