Skip to content

fix(acp): separate canonical relay authority from transport - #6414

Open
RossHartmann wants to merge 1 commit into
block:mainfrom
Kiingo:upstream/acp-canonical-relay-20260820
Open

fix(acp): separate canonical relay authority from transport#6414
RossHartmann wants to merge 1 commit into
block:mainfrom
Kiingo:upstream/acp-canonical-relay-20260820

Conversation

@RossHartmann

Copy link
Copy Markdown

Summary

  • keep the configured relay URL as the network dial target while allowing a canonical community URL to supply NIP-42/NIP-98 authority
  • preserve the canonical Host header across private WebSocket and HTTP relay transport
  • validate canonical URLs fail closed for invalid schemes, credentials, hosts, and ports

Why

Hosted/private deployments can reach a relay through an internal address while the relay still binds authentication and community selection to its public canonical host. Conflating transport and authority breaks otherwise-valid NIP-42/NIP-98 authentication.

Validation

  • cargo fmt --all -- --check
  • cargo test -p buzz-acp relay --locked -- --nocapture (94 passed)
  • git diff --check

The commit is signed off under the DCO.

Signed-off-by: Ross Hartmann <1750494+RossHartmann@users.noreply.github.com>
@RossHartmann
RossHartmann requested a review from a team as a code owner August 20, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant