From c6b0f4e46d1b2c5920da0d642a809df6ae1d1238 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Wed, 3 Sep 2025 17:08:57 +0100 Subject: [PATCH] add http to onion url --- routstr/nip91.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routstr/nip91.py b/routstr/nip91.py index 9a90ada7..407c91c8 100644 --- a/routstr/nip91.py +++ b/routstr/nip91.py @@ -497,7 +497,12 @@ async def announce_provider() -> None: if base_url and base_url.strip() and base_url.strip() != "http://localhost:8000": endpoint_urls.append(base_url.strip()) if onion_url and onion_url.strip(): - endpoint_urls.append(onion_url.strip()) + ou = onion_url.strip() + if ou.endswith(".onion") and not ( + ou.startswith("http://") or ou.startswith("https://") + ): + ou = f"http://{ou}" + endpoint_urls.append(ou) if not endpoint_urls: logger.warning(