Skip to content

Allow local and dev origins in MCP Apps sandbox referrer checks#1278

Open
fengfeng-zi wants to merge 1 commit intomodelcontextprotocol:mainfrom
fengfeng-zi:fix/sandbox-dev-origin-allowlist-1276
Open

Allow local and dev origins in MCP Apps sandbox referrer checks#1278
fengfeng-zi wants to merge 1 commit intomodelcontextprotocol:mainfrom
fengfeng-zi:fix/sandbox-dev-origin-allowlist-1276

Conversation

@fengfeng-zi
Copy link
Copy Markdown

Summary

  • replace the hardcoded localhost-only referrer regex with helper-based validation for local and dev hosts
  • allow loopback, .localhost, .local, and RFC1918 private IPv4 origins while keeping existing http/https and parent-origin checks
  • tighten the rejection message to reflect the intended local/dev-only policy

Closes #1276

Testing

  • Not run locally in this environment

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.

MCP Apps sandbox rejects valid local/dev origins because embedding referrer allowlist is hardcoded to localhost

1 participant