[v1.x] Follow redirects only within the MCP endpoint's origin (#3448)

This commit is contained in:
Max 2026-09-05 02:35:49 +01:00 • committed by GitHub
commit 2106335745
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,7 +151,7 @@ async def main():
callback_handler=handle_callback,
)
async with httpx.AsyncClient(auth=oauth_auth, follow_redirects=True) as custom_client:
async with httpx.AsyncClient(auth=oauth_auth) as custom_client:
async with streamable_http_client("http://localhost:8001/mcp", http_client=custom_client) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()