-
Notifications
You must be signed in to change notification settings - Fork 12
Update custom domain publishing approach #3917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Preview deployments |
ugh what is happening
There was a problem hiding this 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".
| if (publishedURL.host.toLowerCase() !== overrideDomain.toLowerCase()) { | ||
| return { applied: false, publishedRealmURL }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
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.
PUBLISHED_REALM_DOMAIN_OVERRIDESis an environment variable that lets us add to the hardcoded mapping without requiring a full deployment.PUBLISHED_REALM_DOMAIN_OVERRIDESthrough from the realm server’sindex.html-serving function.