mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: Fix es self signed certificate
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user