summaryrefslogtreecommitdiff
path: root/boto/cloudsearch2/document.py
diff options
context:
space:
mode:
Diffstat (limited to 'boto/cloudsearch2/document.py')
-rw-r--r--boto/cloudsearch2/document.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/boto/cloudsearch2/document.py b/boto/cloudsearch2/document.py
index 3244a47a..3b36f133 100644
--- a/boto/cloudsearch2/document.py
+++ b/boto/cloudsearch2/document.py
@@ -93,6 +93,12 @@ class DocumentServiceConnection(object):
self.documents_batch = []
self._sdf = None
+ # Copy proxy settings from connection
+ if self.domain and self.domain.layer1 and self.domain.layer1.use_proxy:
+ self.proxy = {'http': self.domain.layer1.get_proxy_url_with_auth()}
+ else:
+ self.proxy = {}
+
def add(self, _id, fields):
"""
Add a document to be processed by the DocumentService
@@ -184,6 +190,7 @@ class DocumentServiceConnection(object):
# Keep-alive is automatic in a post-1.0 requests world.
session = requests.Session()
+ session.proxies = self.proxy
adapter = requests.adapters.HTTPAdapter(
pool_connections=20,
pool_maxsize=50,