Skip to content

feat(selfhost): allow additional trusted browser origins#1441

Open
salmonumbrella wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
salmonumbrella:fix/selfhost-trusted-origins
Open

feat(selfhost): allow additional trusted browser origins#1441
salmonumbrella wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
salmonumbrella:fix/selfhost-trusted-origins

Conversation

@salmonumbrella

Copy link
Copy Markdown

Closes #1440

Summary

  • add a validated EXECUTOR_TRUSTED_ORIGINS allowlist for self-hosted browser aliases
  • keep EXECUTOR_WEB_BASE_URL canonical for OAuth callbacks and generated URLs
  • improve invalid-origin guidance and document the new setting

Security

  • accepts exact, explicit HTTP and HTTPS origins only
  • rejects credentials, paths, queries, fragments, wildcards, and other schemes
  • never infers trusted origins from request headers
  • preserves the existing single-origin default when unset

Verification

  • bun run format
  • bun run format:check
  • bun run lint
  • bun run typecheck
  • bun run --cwd apps/host-selfhost test (18 files, 80 tests)

@salmonumbrella

Copy link
Copy Markdown
Author

Some context on why the mixed-protocol example (https canonical + http trusted origins) is the headline use case: umbrelOS — and home servers like it — serve local access (umbrel.local, LAN IP) over plain HTTP only. HTTPS for local access has been an open umbrelOS request since 2021 (getumbrel/umbrel#546), while remote access via Tailscale is HTTPS. So a self-hosted instance on that class of host unavoidably spans one https origin plus http local aliases, and a single canonical EXECUTOR_WEB_BASE_URL can't cover them.

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.

Support additional trusted browser origins for self-hosted instances

1 participant