Skip to content

Commit

Permalink
[DM-41830] Fix URL joining
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbanek committed Dec 12, 2023
1 parent aec539f commit 02d4427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lsst/rsp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"


Expand Down

0 comments on commit 02d4427

Please sign in to comment.