From b54767f7ce461d77c4de63e7c436e2919b475a93 Mon Sep 17 00:00:00 2001 From: Lionel PRAT Date: Fri, 13 Dec 2019 17:45:21 +0100 Subject: [PATCH] Fix proxy error because api in https and proxy configured only for http --- OTXv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTXv2.py b/OTXv2.py index 33f4692..d96655a 100755 --- a/OTXv2.py +++ b/OTXv2.py @@ -91,7 +91,7 @@ class OTXv2(object): def __init__(self, api_key, proxy=None, server="https://otx.alienvault.com", project="SDK", user_agent=None): self.key = api_key self.server = server - self.proxies = {'http': proxy} if proxy else {} + self.proxies = {'http': proxy, 'https': proxy} if proxy else {} self.request_session = None self.headers = { 'X-OTX-API-KEY': self.key,