From ed919c9c49746f670a39fbfefcad78c91f9813ff Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 20 Apr 2026 13:33:40 +0800 Subject: [PATCH] fix: Fix es self signed certificate --- backend/apps/db/es_engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/db/es_engine.py b/backend/apps/db/es_engine.py index 27f46b76..9e147d63 100644 --- a/backend/apps/db/es_engine.py +++ b/backend/apps/db/es_engine.py @@ -113,13 +113,13 @@ def get_es_data_by_http(conf: DatasourceConf, sql: str): # Security improvement: Enable SSL certificate verification # Note: In production, always set verify=True or provide path to CA bundle # If using self-signed certificates, provide the cert path: verify='/path/to/cert.pem' - verify_ssl = True if not url.startswith('https://localhost') else False + # verify_ssl = True if not url.startswith('https://localhost') else False response = requests.post( host, data=json.dumps({"query": sql}), headers=get_es_auth(conf), - verify=verify_ssl, + verify=False, timeout=30 # Add timeout to prevent hanging )