Skip to content

feat: add AGENT_BROWSER_ALLOWED_ORIGIN env var for stream server security#313

Open
wsxiaoys wants to merge 1 commit intovercel-labs:mainfrom
wsxiaoys:feat/allowed-origin-env
Open

feat: add AGENT_BROWSER_ALLOWED_ORIGIN env var for stream server security#313
wsxiaoys wants to merge 1 commit intovercel-labs:mainfrom
wsxiaoys:feat/allowed-origin-env

Conversation

@wsxiaoys
Copy link

Summary

Added AGENT_BROWSER_ALLOWED_ORIGIN environment variable to src/stream-server.ts to allow whitelisting WebSocket origins via regex. This enhances security by allowing users to restrict which origins can connect to the stream server.

Also updated:

  • README.md and docs/src/app/streaming/page.tsx with documentation on how to use the new environment variable.
  • cli/src/output.rs to include the new variable in the help output.
  • skills/agent-browser/SKILL.md to list the new environment variable.

Test plan

  • Verified that the server rejects connections from disallowed origins.
  • Verified that the server allows connections from allowed origins (matching the regex).
  • Verified that connections with no origin (e.g. CLI tools) and file:// origins are still allowed.
  • Verified documentation updates.

🤖 Generated with Pochi | Task

@vercel
Copy link
Contributor

vercel bot commented Jan 28, 2026

@wsxiaoys is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@wsxiaoys
Copy link
Author

fix #310

@wsxiaoys
Copy link
Author

Kindly ping for review

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