diff options
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py index 3c0d337..c5f13c1 100644 --- a/webactivity.py +++ b/webactivity.py @@ -159,6 +159,11 @@ class WebActivity(activity.Activity): session.set_property('ssl-use-system-ca-file', True) session.set_property('ssl-strict', False) + # Honor the http_proxy variable + if os.environ.get('http_proxy') is not None: + proxy_uri = Soup.URI.new(os.environ['http_proxy']) + session.set_property("proxy-uri",proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: |