You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: allow additional Origins on an mcp mount #717
The mcp extension (0.6.1, #676/#685) admits a present Origin only when it exactly equals the site's --origin. urlcode-ai's single container serves several hostnames through one load balancer (api.urlcode.ai, which is --origin, plus urlcode.ai and mcp.urlcode.ai), and the documented MCP endpoint is https://urlcode.ai/mcp. A browser MCP client on the documented endpoint's own origin now gets 403. Our previous hand-written server allowed a configured list.
Not a problem for us today, since no browser client exists, but it rules out any browser client on an alias hostname.
Proposed behavior and alternatives
An optional per-server allowedOrigins list in the extension config. The canonical --origin is always allowed, and a missing Origin is still admitted.
Alternative: a core-level list of additional site origins that same-origin checks (mcp, forms, store) all honor.
Decision (owner, 2026-09-25): one site-wide list of additional origins, set by the operator.
It is configured where the canonical --origin is configured today (a serve/deployment option), not in route or extension YAML. AGENTS.md: no provider infrastructure settings in route YAML.
Core validates the entries (absolute https: origins, or http://localhost in dev; no paths or wildcards; bounded count) and exposes them to extensions next to origin through the generic extension context. Core does not learn any extension name.
Every same-origin check honours the list: mcp (mcp.ts ~515), forms, store, auth and admin. A missing Origin keeps its current per-extension treatment. The canonical origin stays the one used for generated absolute URLs.
Tests: an alias origin is admitted by each extension's check, an unlisted origin is still refused, and invalid entries are refused at startup. Document it on the deployment/operations page and in each extension's README section on origin checks.
Activity
jimhoyd commentedon Sep 25, 2026
Decision (owner, 2026-09-25): one site-wide list of additional origins, set by the operator.
--originis configured today (a serve/deployment option), not in route or extension YAML. AGENTS.md: no provider infrastructure settings in route YAML.https:origins, orhttp://localhostin dev; no paths or wildcards; bounded count) and exposes them to extensions next tooriginthrough the generic extension context. Core does not learn any extension name.mcp.ts~515), forms, store, auth and admin. A missingOriginkeeps its current per-extension treatment. The canonical origin stays the one used for generated absolute URLs.Removing
needs-decision.Generated by Claude Code
feat: operator alias origins for every same-origin check; release-pin…