aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 3cb2ef2..4cba789 100644
--- a/config/config.go
+++ b/config/config.go
@@ -26,6 +26,7 @@ const (
defaultCertDomain = ""
defaultCertCache = "/tmp/cert_cache"
defaultCleanupFrequency = 24
+ defaultProxyImages = "http-only"
)
// Config manages configuration parameters.
@@ -217,6 +218,11 @@ func (c *Config) PocketConsumerKey(defaultValue string) string {
return c.get("POCKET_CONSUMER_KEY", defaultValue)
}
+// ProxyImages returns "none" to never proxy, "http-only" to proxy non-HTTPS, "all" to always proxy.
+func (c *Config) ProxyImages() string {
+ return c.get("PROXY_IMAGES", defaultProxyImages)
+}
+
// NewConfig returns a new Config.
func NewConfig() *Config {
cfg := &Config{