-
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
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".
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: 13975e58ae
ℹ️ 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".
| let overriddenURL = new URL(publishedRealmURL); | ||
| overriddenURL.host = overrideDomain; |
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.
Parse override host before assigning to URL.host
The override value is fed directly into URL.host, but overrides can come from env JSON and the server-side parser explicitly accepts full URLs (e.g. https://whitepaper.boxel.ai). If the override includes a scheme, overriddenURL.host = overrideDomain produces a malformed URL like https://https/, which then shows a broken URL in the modal and causes publish requests to fail for those overrides. Consider parsing/normalizing the override string to hostname/port (or stripping scheme) before assigning it to host.
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.