Honour ELASTICSEARCH_SCHEME setting

This commit is contained in:
Miguel Afonso 2021-08-26 15:01:11 +01:00 committed by Régis Behmo
parent 2ce2473692
commit c81205b6dd

View File

@ -21,7 +21,8 @@ DATABASES = {
}
ELASTICSEARCH_DSL['default'].update({
'hosts': "http://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}/"
{% if ELASTICSEARCH_SCHEME == "https" %}"use_ssl": True,{% endif %}
'hosts': {% if ELASTICSEARCH_SCHEME == "https" %}"https","http"{% endif %}://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}/"
})
{% for name, index in DISCOVERY_INDEX_OVERRIDES.items() %}