Conversation
web.phcode.dev becomes the new home for the hosted web app, with phcode.dev deprecated shortly after. Most of the app is origin-relative and boots on a new host unchanged (service worker scope, VFS base URL, PWA manifest, CSP). What needed fixing are the places that compare against a hardcoded list of known origins: - Phoenix.TRUSTED_ORIGINS in src/index.html and test/SpecRunner.html, which is also serialized into live preview pages as TRUSTED_ORIGINS_EMBED. - The duplicate list in live-preview-loader.html. This page also lacked the TRUSTED_ORIGINS[location.origin] = true self-add that the other two copies have, so it is the one origin list that could not adapt to a new host on its own. Added. - loggableURLS in loggerSetup.js. This is a startsWith prefix match, so https://web.phcode.dev/ did not match https://phcode.dev and Bugsnag would have been silently disabled on the new domain. Same for the safeStarts list, which decides whether our own URLs survive path redaction in error reports. Deprecation of phcode.dev: - The dev/staging interstitial now redirects to web.phcode.dev instead of the domain being retired. web.phcode.dev is deliberately not added to that gated-hostname list, it is production. - og:url, twitter:url, the robots.txt sitemap line and sitemap-phcode.xml point at the new home. Both domains serve the same artifact during the overlap, so this consolidates SEO and link previews. Analytics for the prod web build move to a new GA property and core-analytics app name so the retired endpoint stops accruing data. Desktop GA, desktop app name and MixPanel are unchanged, the desktop app is not moving origins. Note that phcode.live must allowlist the new origin in its own docs/trustedOrigins.js, and account.phcode.dev needs CORS for it with Allow-Credentials, otherwise login and live preview fail silently.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



web.phcode.dev becomes the new home for the hosted web app, with phcode.dev deprecated shortly after.
Most of the app is origin-relative and boots on a new host unchanged (service worker scope, VFS base URL, PWA manifest, CSP). What needed fixing are the places that compare against a hardcoded list of known origins:
Deprecation of phcode.dev:
Analytics for the prod web build move to a new GA property and core-analytics app name so the retired endpoint stops accruing data. Desktop GA, desktop app name and MixPanel are unchanged, the desktop app is not moving origins.
Note that phcode.live must allowlist the new origin in its own docs/trustedOrigins.js, and account.phcode.dev needs CORS for it with Allow-Credentials, otherwise login and live preview fail silently.