René's URL Explorer Experiment


Title: feat(a2a): agent-card public URL injection (X-Forwarded-Host aware) · Issue #616 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: feat(a2a): agent-card public URL injection (X-Forwarded-Host aware) · Issue #616 · adcontextprotocol/adcp-client-python

X Title: feat(a2a): agent-card public URL injection (X-Forwarded-Host aware) · Issue #616 · adcontextprotocol/adcp-client-python

Description: Problem adcp.server.a2a_server._build_agent_card hardcodes http://localhost:{port}/ at server-init time. There's no hook for injecting a public URL. In production the bound socket is internal — the public URL comes from the load balancer...

Open Graph Description: Problem adcp.server.a2a_server._build_agent_card hardcodes http://localhost:{port}/ at server-init time. There's no hook for injecting a public URL. In production the bound socket is internal — the...

X Description: Problem adcp.server.a2a_server._build_agent_card hardcodes http://localhost:{port}/ at server-init time. There's no hook for injecting a public URL. In production the bound socket is internal —...

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/616

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(a2a): agent-card public URL injection (X-Forwarded-Host aware)","articleBody":"## Problem\n\n`adcp.server.a2a_server._build_agent_card` hardcodes `http://localhost:{port}/` at server-init time. There's no hook for injecting a public URL.\n\nIn production the bound socket is internal — the public URL comes from the load balancer's `X-Forwarded-Host` (or the request `Host`). Without intervention, the static localhost URL leaks into `/.well-known/agent-card.json`, and SDK clients that read the card to discover the JSON-RPC endpoint try to reach `http://localhost:8080/` from outside the container, failing every A2A request with `fetch failed`.\n\n## Workaround\n\nWe run a 190-LOC ASGI middleware (`AgentCardPublicUrlMiddleware`) that intercepts the `/.well-known/agent-card.json` response, parses the JSON body, rewrites the URL fields based on `X-Forwarded-Host`/`Host`/`X-Forwarded-Proto`, and sends the modified payload. Rewrites both top-level `url` and every `supportedInterfaces[].url`. Only rewrites loopback URLs so explicit configurations pass through.\n\nThis is brittle — buffer the response, parse JSON, mutate, re-encode, recompute `Content-Length`, forward. One bug in the buffering and discovery silently breaks.\n\n## Proposed SDK shape\n\nEither:\n\n**A) `serve(public_url=...)` kwarg** — explicit override, simplest. Adopters set it once at boot; framework uses it instead of the bound-socket URL when building the card.\n\n**B) Honour `X-Forwarded-Host` natively** — when an inbound request to `/.well-known/agent-card.json` carries `X-Forwarded-Host` (or `X-Forwarded-Proto`), the framework derives the public URL from those headers and uses them in the response. Matches HTTP-server convention; no new public API needed beyond a `trust_forwarded_headers=True` opt-in.\n\n**C) Both** — `public_url=` for static config, `X-Forwarded-Host` for dynamic deployments behind a reverse proxy.\n\n## Files\n\n- Our workaround: [core/middleware/agent_card_public_url.py](https://github.com/prebid/salesagent/blob/main/core/middleware/agent_card_public_url.py)\n- Local tracker: prebid/salesagent#103\n\n## Related\n\n- #612 (also open, just filed) — `/.well-known/agent.json` 0.3 alias 404. Solving that doesn't help with the public-URL leak; both need fixing.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-10T12:18:07Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/616"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:462a692e-e4af-1428-193c-3c0c27ba7eb3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id89DE:213839:240E1C5:2E11B1F:6B01773E
html-safe-nonce6f08554a35c632c78b326e177e7075c61be5cf8e57fe1321f852367f6e69995e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OURFOjIxMzgzOToyNDBFMUM1OjJFMTFCMUY6NkIwMTc3M0UiLCJ2aXNpdG9yX2lkIjoiMjE4MDQyODIzMDc5ODk2NDU0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacef6707f3cd2af7d104e845dc8328816b76e5d6f396d7dd3dd836772fc0e38767
hovercard-subject-tagissue:4415583456
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/616/issue_layout
twitter:imagehttps://opengraph.githubassets.com/38c2289abbabe1219f4051b2963cbb97c41d3ad71e4b351c0900486ac2a273ae/adcontextprotocol/adcp-client-python/issues/616
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/38c2289abbabe1219f4051b2963cbb97c41d3ad71e4b351c0900486ac2a273ae/adcontextprotocol/adcp-client-python/issues/616
og:image:altProblem adcp.server.a2a_server._build_agent_card hardcodes http://localhost:{port}/ at server-init time. There's no hook for injecting a public URL. In production the bound socket is internal — the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/616#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F616
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F616
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/616
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/616
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/616
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/616
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/616
#621https://github.com/adcontextprotocol/adcp-client-python/pull/621
feat(a2a): agent-card public URL injection (X-Forwarded-Host aware)https://github.com/adcontextprotocol/adcp-client-python/issues/616#top
#621https://github.com/adcontextprotocol/adcp-client-python/pull/621
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#issue-4415583456
core/middleware/agent_card_public_url.pyhttps://github.com/prebid/salesagent/blob/main/core/middleware/agent_card_public_url.py
Fix CI test failures and SSE connection issues prebid/salesagent#103https://github.com/prebid/salesagent/pull/103
A2A: /.well-known/agent.json (0.3 alias) returns 404 — route not registered, breaking SDK auto-detection #612https://github.com/adcontextprotocol/adcp-client-python/issues/612
bokelleyhttps://github.com/bokelley
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#event-25353056564
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#issuecomment-4415301206
#621https://github.com/adcontextprotocol/adcp-client-python/pull/621
https://claude.ai/code/session_01NXgGie4ARyxg3hWBYo5tG6https://claude.ai/code/session_01NXgGie4ARyxg3hWBYo5tG6
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#event-25353242467
bokelleyhttps://github.com/bokelley
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#event-25353401616
feat(a2a): add public_url param to agent card for production deploymentshttps://github.com/adcontextprotocol/adcp-client-python/commit/faa436ad873ff28b646568a49756bc9c264735b7
https://docs.github.com/articles/closing-issues-via-commit-messages
faa436ahttps://github.com/adcontextprotocol/adcp-client-python/commit/faa436ad873ff28b646568a49756bc9c264735b7
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#621https://github.com/adcontextprotocol/adcp-client-python/pull/621
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#event-25353476614
KonstantinMirinhttps://github.com/KonstantinMirin
on May 13, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/616#event-25486672631
feat(a2a): add public_url param to agent card for production deployme…https://github.com/KonstantinMirin/adcp-client-python/commit/14d294c7922ad0fa91b30ad1f03de75ff9c7b694
https://docs.github.com/articles/closing-issues-via-commit-messages
14d294chttps://github.com/KonstantinMirin/adcp-client-python/commit/14d294c7922ad0fa91b30ad1f03de75ff9c7b694
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/616
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/616
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.