Skip to content

Commit

Permalink
Disable SSL verification for all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
clarencecastillo committed Jun 1, 2020
1 parent d030c5c commit 84c1547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def thesaurus_query(self, term_id, query_type):
if not term_id:
return []
params = self.build_thesaurus_query_params(term_id, query_type)
r = requests.post(self.api_url, json=params, headers=self.request_headers)
r = requests.post(self.api_url, json=params, headers=self.request_headers, verify=False)
self.logger.debug('thesaurus_query: {} {}'.format(r.status_code, r.url))
r.raise_for_status()
return self.parse_thesaurus_query_response(r.json())
Expand All @@ -108,7 +108,7 @@ def parse_search_query_response(self, response):

def search_query(self, query):
params = self.build_search_query_params(query)
r = requests.post(self.api_url, json=params, headers=self.request_headers)
r = requests.post(self.api_url, json=params, headers=self.request_headers, verify=False)
self.logger.debug('search_query: {} {}'.format(r.status_code, r.url))
r.raise_for_status()
return self.parse_search_query_response(r.json())
Expand Down

1 comment on commit 84c1547

@rooted-admin
Copy link

@rooted-admin rooted-admin commented on 84c1547 Jun 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for identifying and pushing a temporary fix. it would be super cool if you could make this an environment variable that can be toggled from Alfred preferences! that way when they fix their cert issue is can easily be toggled back without a code change

Please sign in to comment.