Remove proxy config detection from API payload
@@ -180,7 +180,7 @@ class PackSearchController(object):
def post(self, pack_search_request):
- proxy_config = self._get_proxy_config(pack_search_request)
+ proxy_config = self._get_proxy_config()
if hasattr(pack_search_request, 'query'):
packs = packs_service.search_pack_index(pack_search_request.query,
@@ -192,12 +192,7 @@ class PackSearchController(object):
proxy_config=proxy_config)
return PackAPI(**pack) if pack else []
- def _get_proxy_config(self, pack_search_request):
- proxy_config = None
- if hasattr(pack_search_request, 'proxy_config'):
- LOG.debug('Loading proxy configuration from pack search HTTP request.')
- proxy_config = pack_search_request.proxy_config
- else:
+ def _get_proxy_config(self):
LOG.debug('Loading proxy configuration from env variables %s.', os.environ)
http_proxy = os.environ.get('http_proxy', None)
https_proxy = os.environ.get('https_proxy', None)
