File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
elasticsearch/stac_fastapi/elasticsearch
opensearch/stac_fastapi/opensearch Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 33import ssl
44from typing import Any , Dict , Set
55
6+ import certifi
7+
68from elasticsearch import AsyncElasticsearch , Elasticsearch # type: ignore
79from stac_fastapi .types .config import ApiSettings
810
@@ -31,9 +33,7 @@ def _es_config() -> Dict[str, Any]:
3133
3234 # Include CA Certificates if verifying certs
3335 if config ["verify_certs" ]:
34- config ["ca_certs" ] = os .getenv (
35- "CURL_CA_BUNDLE" , "/etc/ssl/certs/ca-certificates.crt"
36- )
36+ config ["ca_certs" ] = os .getenv ("CURL_CA_BUNDLE" , certifi .where ())
3737
3838 # Handle authentication
3939 if (u := os .getenv ("ES_USER" )) and (p := os .getenv ("ES_PASS" )):
Original file line number Diff line number Diff line change 33import ssl
44from typing import Any , Dict , Set
55
6+ import certifi
67from opensearchpy import AsyncOpenSearch , OpenSearch
78
89from stac_fastapi .types .config import ApiSettings
@@ -32,9 +33,7 @@ def _es_config() -> Dict[str, Any]:
3233
3334 # Include CA Certificates if verifying certs
3435 if config ["verify_certs" ]:
35- config ["ca_certs" ] = os .getenv (
36- "CURL_CA_BUNDLE" , "/etc/ssl/certs/ca-certificates.crt"
37- )
36+ config ["ca_certs" ] = os .getenv ("CURL_CA_BUNDLE" , certifi .where ())
3837
3938 # Handle authentication
4039 if (u := os .getenv ("ES_USER" )) and (p := os .getenv ("ES_PASS" )):
You can’t perform that action at this time.
0 commit comments