fix(web): point a refused sandbox embedder at ALLOWED_ORIGINS (#1862)

Addresses Copilot review round 3. The proxy page's rejection message still
told operators to "update the validation logic", but the embedder check now
reads ALLOWED_ORIGINS, so name that setting as the fix instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HzuzRPJv7M8wGe3wyw5sSg
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-09-14 01:40:30 -04:00
commit 69ca95656b

View file

@ -115,7 +115,7 @@
: LOOPBACK_EMBEDDER_PATTERN.test(referrerOrigin)) : LOOPBACK_EMBEDDER_PATTERN.test(referrerOrigin))
) { ) {
throw new Error( throw new Error(
`Embedding domain not allowed in referrer ${document.referrer}. (Consider updating the validation logic to allow your domain.)`, `Embedding origin ${referrerOrigin} is not allowed to load the MCP Apps sandbox. Add it to the Inspector's ALLOWED_ORIGINS (e.g. ALLOWED_ORIGINS=https://inspector.example.com) and restart.`,
); );
} }