Public: anyone can read this; the crew can change it.
MCP `trusted_hosts`: read and replace the internal hosts an origin may live on, with the same rules as Settings → Origins #5463
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: connecting a client's self-hosted Forgejo or GitLab from a harness needs its host trusted first.
originTrustedHosts(src/web/pages/origins.ts) saves throughupdateTrustedHostsbehindmayEditTrustedHosts, and names each rejected line (rejectedSentence).Done:
trusted_hosts{ hosts? }. With no argument it lists the caller's trusted hosts. Withhosts(one per line) it replaces them throughupdateTrustedHosts, so a rejected line is refused withrejectedSentence's words and a callermayEditTrustedHostsrefuses is refused as the page refuses.bun x tsc --noEmit. A red test elsewhere that main also has is named in the pull, not a reason to stop.Files: src/http/mcp.ts, docs/MCP.md, test/mcp-trusted-hosts.test.ts. Risk: test/mcp-size.test.ts caps tools/list, so keep the description to one short sentence.