diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-11-26 18:10:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 18:10:50 +0000 |
commit | ef1a85e7733bc1979f48357dd59b638110285075 (patch) | |
tree | 5204485986b64e19152de65f31f76fba303eafa7 /synapse/rest/media | |
parent | Merge pull request #6420 from matrix-org/erikj/fix_find_next_generated_user_i... (diff) | |
download | synapse-ef1a85e7733bc1979f48357dd59b638110285075.tar.xz |
Fix startup error when http proxy is defined. (#6421)
Guess I only tested this on python 2 :/ Fixes #6419.
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index a23d6f5c75..fb0d02aa83 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -77,8 +77,8 @@ class PreviewUrlResource(DirectServeResource): treq_args={"browser_like_redirects": True}, ip_whitelist=hs.config.url_preview_ip_range_whitelist, ip_blacklist=hs.config.url_preview_ip_range_blacklist, - http_proxy=os.getenv("http_proxy"), - https_proxy=os.getenv("HTTPS_PROXY"), + http_proxy=os.getenvb(b"http_proxy"), + https_proxy=os.getenvb(b"HTTPS_PROXY"), ) self.media_repo = media_repo self.primary_base_path = media_repo.primary_base_path |