mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Make image proxy configurable
Adds IMAGE_PROXY configuration setting to change image proxy filter behaviour: - none = No proxy - http-only = Proxy only non-HTTPS images (default) - all = Proxy everything
This commit is contained in:
parent
6fd6f79daf
commit
c926498d3d
4 changed files with 138 additions and 11 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue