From 29e475edb4af0787f3d1ccef08e21732307bcb10 Mon Sep 17 00:00:00 2001 From: Vincent Ruello <5345986+vruello@users.noreply.github.com> Date: Thu, 17 Apr 2025 12:50:35 +0200 Subject: [PATCH] Use path_prefix to compute base_url in httpx --- elastic_transport/_node/_http_httpx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elastic_transport/_node/_http_httpx.py b/elastic_transport/_node/_http_httpx.py index 04ceb60..03316a9 100644 --- a/elastic_transport/_node/_http_httpx.py +++ b/elastic_transport/_node/_http_httpx.py @@ -102,7 +102,7 @@ def __init__(self, config: NodeConfig): ssl_context.load_cert_chain(config.client_cert) self.client = httpx.AsyncClient( - base_url=f"{config.scheme}://{config.host}:{config.port}", + base_url=f"{config.scheme}://{config.host}:{config.port}{config.path_prefix}", limits=httpx.Limits(max_connections=config.connections_per_node), verify=ssl_context or False, timeout=config.request_timeout,