From 02d4427551b83792da3488ae10520e28d7aef851 Mon Sep 17 00:00:00 2001 From: Christine Banek Date: Mon, 11 Dec 2023 17:41:24 -0700 Subject: [PATCH] [DM-41830] Fix URL joining We ended up with too many slashes after the hostname, which woul confuse pyvo. This would end up in an unauthorized. Many ways we can do this, like urljoin, but I'm just as nervous about all this parsing going one way or thee others. Just going to leave it lay until Frossie wants to do service discovery work. --- src/lsst/rsp/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lsst/rsp/utils.py b/src/lsst/rsp/utils.py index a2a223b..b6cf32d 100644 --- a/src/lsst/rsp/utils.py +++ b/src/lsst/rsp/utils.py @@ -64,7 +64,7 @@ def get_service_url(name: str, env_name: Optional[str] = None) -> str: return url fqdn = os.getenv("EXTERNAL_INSTANCE_URL") or "" - path = os.getenv(f"{env_name}_ROUTE") or f"/api/{name}" + path = os.getenv(f"{env_name}_ROUTE") or f"api/{name}" return f"{fqdn}/{path}"