zthumbor: Respect proxy configuration.

This commit is contained in:
Alex Vandiver 2020-10-15 09:48:19 +00:00 committed by Tim Abbott
parent 6b9d7000b5
commit ac6a40e262
1 changed files with 8 additions and 6 deletions

View File

@ -304,13 +304,15 @@ ALLOW_OLD_URLS = False
## Defaults to: 'Thumbor/6.1.5'
#HTTP_LOADER_DEFAULT_USER_AGENT = 'Thumbor/6.1.5'
## The proxy host needed to load images through
## Defaults to: None
#HTTP_LOADER_PROXY_HOST = None
## The proxy port for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_PORT = None
if config_file.has_option("http_proxy", "host") and config_file.has_option("http_proxy", "port"):
## The proxy host needed to load images through
## Defaults to: None
HTTP_LOADER_PROXY_HOST = config_file.get("http_proxy", "host")
## The proxy port for the proxy host
## Defaults to: None
HTTP_LOADER_PROXY_PORT = int(config_file.get("http_proxy", "port"))
## The proxy username for the proxy host
## Defaults to: None