Repository navigation
Proxy legacy pages from Cloudflare Pages instead of Render - #4
Merged
Merged
Conversation
The legacy Jekyll site (docs, blog, and not-yet-ported pages) is now deployed at applandinc-github-io.pages.dev as part of migrating off Render onto Cloudflare entirely. Point the worker's legacy fallback origin there. Verified parity against the Render origin across the paths the worker proxies: identical 220-URL sitemap, byte-identical page bodies apart from build-time timestamps in the schema.org metadata, and a real 404 status on unknown paths, which fetchFromLegacySite relies on to fall through to the app's own 404. Pages adds trailing-slash and .html normalization that Render did not (/blog -> /blog/, /docs/ -> /docs, /foo.html -> /foo). Every one of those maps to the same string under normalizeLegacyPath, so the existing ping-pong guard follows them internally and serves content rather than bouncing the browser; no redirect is visible on appmap.io. Cost is one extra origin subrequest on those forms. The Pages project needed JEKYLL_ENV=production set before cutover: its first build omitted the Google Analytics and HubSpot embeds, which sit behind a jekyll.environment conditional.
There was a problem hiding this comment.
🟢 Approval recommended
The narrow origin change preserves existing fallback handling, with no blocking issues identified.
0 open findings
What changed in this PR
Moves the worker’s legacy-site fallback from Render to Cloudflare Pages as part of the Cloudflare migration.
Changes:
- Updates the default legacy origin while preserving existing fallback logic.
- Revises comments to describe Cloudflare Pages hosting.
| File | Description |
|---|---|
wrangler.jsonc |
Updates comments documenting the default legacy origin. |
src/server.ts |
Switches the default origin to Pages and updates related comments. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dividedmind
force-pushed
the
legacy-origin-cloudflare-pages
branch
from
October 15, 2026 14:10
65327e3 to
e2c731f
Compare
…o URL The preview job has never produced a preview URL. It was not failing either: `wrangler versions upload` uploaded a version fine but printed no Version URL, the grep for one came up empty, and the "Add preview URL to summary" step was then skipped by its own `if:` guard. The job went green with nothing to preview. Version URLs were the wrong tool anyway. Worker Previews (GA 2026-09-22) give a branch a stable URL that every push updates, with isolated config, state and observability, where Version URLs only ever pointed at production resources. Switch the job to `wrangler preview` and add the `previews` block it requires. The block is empty for now; it is also where a per-Preview LEGACY_ORIGIN override would go if a Preview ever needs to point at a branch build of the legacy site. Unlike environments, "previews" is accepted in the redirected config nitro writes to .output/server/wrangler.json. The CLI still labels the command "private beta", but this account has access. Make the step fail outright when no URL comes back, and drop the `if:` guard that let an empty value silently skip the summary. A missing preview URL should be a red job, not a green one, however it comes about. The URL is read from --json, falling back to scraping the human output, since the JSON shape is not pinned down yet. Verified against the resulting Preview: the legacy docs and blog paths proxy from the Pages origin (confirmed by build timestamp), the .html and trailing-slash forms resolve to 200 without bouncing the browser, sitemap-docs.xml matches the Pages sitemap byte for byte, unknown paths still 404 to the app rather than the legacy site, and the redirect table is intact. Assisted-by: Claude:claude-opus-5
dividedmind
force-pushed
the
legacy-origin-cloudflare-pages
branch
from
October 15, 2026 14:16
e2c731f to
8337124
Compare
Contributor
Author
|
Note I had to modify CI to make the preview deployment work. |
kgilpin
approved these changes
Oct 15, 2026
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.
The legacy Jekyll site (docs, blog, and not-yet-ported pages) is now deployed at applandinc-github-io.pages.dev as part of migrating off Render onto Cloudflare entirely. Point the worker's legacy fallback origin there.
Verified parity against the Render origin across the paths the worker proxies: identical 220-URL sitemap, byte-identical page bodies apart from build-time timestamps in the schema.org metadata, and a real 404 status on unknown paths, which fetchFromLegacySite relies on to fall through to the app's own 404.
Pages adds trailing-slash and .html normalization that Render did not (/blog -> /blog/, /docs/ -> /docs, /foo.html -> /foo). Every one of those maps to the same string under normalizeLegacyPath, so the existing ping-pong guard follows them internally and serves content rather than bouncing the browser; no redirect is visible on appmap.io. Cost is one extra origin subrequest on those forms.
The Pages project needed JEKYLL_ENV=production set before cutover: its first build omitted the Google Analytics and HubSpot embeds, which sit behind a jekyll.environment conditional.