From 8227950b08b8a2ab7f5d502dd2b204a50e46f969 Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Fri, 13 Jun 2025 16:44:15 -0500 Subject: [PATCH] Properly validate caCert value --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 1cf16a3..d41815b 100644 --- a/index.ts +++ b/index.ts @@ -146,7 +146,7 @@ export async function createElasticsearchMcpServer (config: ElasticsearchConfig) // Set up SSL/TLS certificate if provided clientOptions.tls = {} - if (caCert != null) { + if (caCert != null && caCert.length > 0) { try { const ca = fs.readFileSync(caCert) clientOptions.tls.ca = ca