Skip to content

Commit 2e6e24b

Browse files
committed
fix(lifespan): allow endpoints that don't support trailing slashes
e.g. OIDC_DISCOVERY_URL=https://accounts.google.com/.well-known/openid-configuration
1 parent b7c6ea6 commit 2e6e24b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/stac_auth_proxy/lifespan.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ async def check_server_health(
4040
if isinstance(url, HttpUrl):
4141
url = str(url)
4242

43-
async with httpx.AsyncClient(
44-
base_url=url, timeout=timeout, follow_redirects=True
45-
) as client:
43+
async with httpx.AsyncClient(timeout=timeout, follow_redirects=True) as client:
4644
for attempt in range(max_retries):
4745
try:
48-
response = await client.get("/")
46+
response = await client.get(url)
4947
response.raise_for_status()
5048
logger.info(f"Upstream API {url!r} is healthy")
5149
return

0 commit comments

Comments
 (0)