Repository navigation
Description
The workflow
As a deployment operator, I want to host the BB account/relay service at an HTTPS origin such as https://bb.example.com, with a standalone BB on my own VPS at https://alice.bb.example.com. I would like to use stock BB rather than maintain a client fork just to trust my relay origin.
What happens today
The CLI exposes --base-url, but a custom production HTTPS origin is rejected before code redemption. Example commands (placeholder code only):
bb account login --code 'PLACEHOLDER-CODE' --base-url https://bb.example.com
bb connect --code 'PLACEHOLDER-CODE' --base-url https://bb.example.comSource-level check against desktop-v0.46.1, commit 411eac54ac16d0a3cb57d1de8396d37564884a73: isAllowedBaseUrl("https://getbb.app", { NODE_ENV: "production" }) returns true; the same check for https://bb.example.com returns false. This is a policy-function repro, not a completed end-to-end custom-relay login.
The allowlist only accepts the two built-in production origins. resolveBaseUrl rejects others with:
bb can't sign in to https://bb.example.com; use https://getbb.app or https://vibecodethis.site (a development build also accepts http://bb.localhost:<port>)
Checked on 2026-10-19: GitHub's latest release is still desktop-v0.46.1; current main has the same restriction.
What you would expect
- An explicit deployment-operator opt-in for trusted self-hosted HTTPS account/relay origins in production, with secure defaults unchanged.
- One consistent trust policy across account login, code redemption and Connect where applicable; configuration naming/API is up to maintainers.
- Configured origins work; unknown or malformed origins are rejected, including unsafe schemes, embedded credentials and non-origin URLs.
- Documentation and tests for default, configured and rejected cases. No
NODE_ENV=developmentworkaround.
The initial request is for standalone server/CLI. Desktop/mobile support can be scoped separately.
Context and alternatives
Searched open/closed issues and Discussions for self-hosting, custom domains and the origin guard. Related #483 concerns remote sessions and #5740 concerns switching mobile server profiles; neither requests a configurable account/relay origin policy. A maintained client fork adds release/update work that this configuration could avoid.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 19, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied the missing classification:
remote,security,connectRepository main deliberately restricts production account origins; operator-configurable trust would add functionality rather than repair unexpected behavior. No existing classification values needed preserving; all writes were verified.
No bug report or PR: this is a feature requiring a product/security policy decision, not a simple bug fix.
toolittlecakes commentedon Oct 26, 2026
I've prepared and opened #6307 to address this request. It adds opt-in, server-configured trusted account origins via
BB_ACCOUNT_TRUSTED_ORIGINS, shared by account login and Connect, while preserving the default trust policy. The PR includes documentation and tests and is ready for maintainer review.