Skip to content

Commit

Permalink
Add ES_VERIFY_CERTS to support https traffic without configuring cert…
Browse files Browse the repository at this point in the history
…ificates
  • Loading branch information
rkorytkowski committed Jan 26, 2024
1 parent ce21ba6 commit c68afe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
ES_PORT = os.environ.get('ES_PORT', '9200') # Deprecated. Use ES_HOSTS instead.
ES_HOSTS = os.environ.get('ES_HOSTS', None)
ES_SCHEME = os.environ.get('ES_SCHEME', 'http')
ES_VERIFY_CERTS = os.environ.get('ES_VERIFY_CERTS', ES_SCHEME == 'https')
ES_USER = os.environ.get('ES_USER', None)
ES_PASSWORD = os.environ.get('ES_PASSWORD', None)
http_auth = None
Expand All @@ -214,7 +215,7 @@
'hosts': ES_HOSTS.split(',') if ES_HOSTS else [ES_HOST + ':' + ES_PORT],
'http_auth': http_auth,
'use_ssl': ES_SCHEME == 'https',
'verify_certs': ES_SCHEME == 'https',
'verify_certs': ES_VERIFY_CERTS,
'sniff_on_connection_fail': True,
'sniff_on_start': True,
'sniffer_timeout': 60,
Expand Down

0 comments on commit c68afe6

Please sign in to comment.