From 6656b379610c19a3a99ca95a4c7b0fd64bf12067 Mon Sep 17 00:00:00 2001 From: Sym Roe Date: Mon, 24 Jun 2019 11:35:46 +0100 Subject: [PATCH] Pass certifi.where() to Elasticsearch2SearchEngine See https://github.com/django-haystack/django-haystack/issues/1678 --- webapp_settings/production.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp_settings/production.py b/webapp_settings/production.py index f2725c2..ed2d41a 100644 --- a/webapp_settings/production.py +++ b/webapp_settings/production.py @@ -1,4 +1,5 @@ # Only set this to True in development environments +import certifi DEBUG = False CAN_EDIT_ELECTIONS = False @@ -31,6 +32,11 @@ 'ENGINE': 'haystack.backends.elasticsearch2_backend.Elasticsearch2SearchEngine', 'URL': '{{ AWS_EX_URL }}', 'INDEX_NAME': 'ynr_prod', + 'KWARGS': { + # pass CA cert info to urllib3 to be able to verify connection certificates + 'verify_certs': True, + 'ca_certs': certifi.where() + } }, }