Skip to content

Conversation

@backspace
Copy link
Contributor

@backspace backspace commented Jan 28, 2026

More requirements have emerged so I’m adapting the implementation of custom domain publishing, which is a workaround until we have full support for dynamic creation of CNAMES and the like.

  1. Instead of hardcoding usernames who can publish to overridden custom domains, anyone with write permissions for a realm can publish it.
  2. PUBLISHED_REALM_DOMAIN_OVERRIDES is an environment variable that lets us add to the hardcoded mapping without requiring a full deployment.
  3. The publish modal UI now is now aware of overrides, which necessitated threading PUBLISHED_REALM_DOMAIN_OVERRIDES through from the realm server’s index.html-serving function. e8c0a21ef0e0f5101a0d9e590435203ca7bf96af 2026-01-28 16-25-18
  4. Claiming and overriding the custom subdomain when publishing is no longer needed.

@backspace backspace self-assigned this Jan 28, 2026
@backspace backspace added the enhancement New feature or request label Jan 28, 2026
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 42m 39s ⏱️ +56s
1 925 tests ±0  1 908 ✅ ±0  17 💤 ±0  0 ❌ ±0 
1 940 runs  ±0  1 923 ✅ ±0  17 💤 ±0  0 ❌ ±0 

Results for commit 4be20c6. ± Comparison against base commit afa2175.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

Preview deployments

@backspace backspace changed the title server: Change custom domain override to be permission-based Update custom domain publishing approach Jan 28, 2026
@backspace backspace marked this pull request as ready for review January 28, 2026 23:54
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4be20c6cc3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +59 to +60
if (publishedURL.host.toLowerCase() !== overrideDomain.toLowerCase()) {
return { applied: false, publishedRealmURL };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply override even when published URL uses base domain

This check only applies an override when the requested publishedRealmURL host already equals the override domain. In practice the publish modal still builds URLs using the base Boxel site domain (e.g. *.boxel.site), so any override configured for the source realm is skipped and the realm is published to the base domain instead of the intended custom domain. Unless clients are already sending the custom domain in the publish request, the override never takes effect, which contradicts the UI’s “This site will publish to …” display and the override mapping.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants