Skip to content

Serve production domains from Cloudflare Workers - #200

Merged
robin-liquidium merged 1 commit into
mainfrom
codex/cloudflare-domain-cutover
Sep 7, 2026
Merged

robin-liquidium merged 1 commit into
mainfrom
codex/cloudflare-domain-cutover

Conversation

@robin-liquidium

@robin-liquidium robin-liquidium commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Route runesswap.app and www.runesswap.app directly to the existing Cloudflare Worker. The apex keeps its 308 redirect to www, preserving paths and query strings. Record both custom domains in Wrangler so future deployments retain the production routing.

Hostinger nameservers now delegate to the active Cloudflare zone. DNS and custom domains have been applied; the www hostname serves the TanStack app over HTTPS. Vercel remains available for rollback and must not be deleted until owner verification.

Validation: local structured review passed; pre-push ai-check passed (208 tests, lint, types, unused-code checks, and production build). Production smoke checks verify pages, static assets, live prices, rune information, and charts. Deployment and rollback details are recorded in docs/cloudflare-migration.md.

Summary by CodeRabbit

  • New Features

    • The app is now served through the Cloudflare Worker on runesswap.app and www.runesswap.app.
    • Apex-domain redirects remain supported.
  • Documentation

    • Updated migration and deployment guidance to reflect the completed DNS transition and current verification steps.
    • Retained Vercel as a rollback option.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 77942a8c-d74f-41b1-8d54-328547e200d6

📥 Commits

Reviewing files that changed from the base of the PR and between a157543 and ccc1996.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • docs/cloudflare-migration.md
  • wrangler.jsonc

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Cloudflare Worker now serves runesswap.app and www.runesswap.app. The migration documentation records the completed DNS cutover, and the changelog records the deployment and rollback state.

Changes

Cloudflare routing

Layer / File(s) Summary
Worker domain cutover
wrangler.jsonc, docs/cloudflare-migration.md, CHANGELOG.md
The Worker configuration binds the apex and www domains. The migration documentation records the completed DNS delegation and verification steps. The changelog records the new domain routing and Vercel rollback retention.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to ccc19

The production domains route through the Cloudflare Worker while apex requests continue redirecting to www. The deployment configuration and migration documentation are aligned, with no remaining merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: serving the production domains from Cloudflare Workers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cloudflare-domain-cutover

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@opencode-agent

opencode-agent Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review: Serve production domains from Cloudflare Workers

I reviewed the full diff (wrangler.jsonc, docs/cloudflare-migration.md, CHANGELOG.md) and verified the surrounding code (src/server.ts, src/server.test.ts, package.json).

Verdict: Approve — clean, minimal infra cutover with no code-quality issues

What checks out

  • wrangler.jsonc routes syntax is correct. { "pattern": "...", "custom_domain": true } is the right form for Worker custom domains, and recording both hostnames makes the routing durable across wrangler deploy runs (which bun run deploy uses — verified in package.json). Without this, a future deploy could silently detach the domains, so this is the important part of the PR.
  • The apex→www redirect claim in the PR body is real and tested. src/server.ts rewrites the hostname and returns Response.redirect(url, 308); mutating the parsed URL preserves path and query string, and src/server.test.ts asserts https://runesswap.app/swap?rune=DOGhttps://www.runesswap.app/swap?rune=DOG. Exactly as described.
  • Docs accurately reflect the new state (Hostinger registrar, activated zone, domains attached) and the rollback section correctly retains the Vercel DNS targets and CAA issuers — consistent with the "don't delete Vercel until owner verification" constraint.
  • Changelog discipline followed: entry appended under [Unreleased]Changed, per AGENTS.md.

Minor observations (non-blocking)

  1. Inconsistent canonical host in OG tags (pre-existing, not introduced here): src/routes/__root.tsx uses https://www.runesswap.app for og:url but https://runesswap.app (apex) for og:image/twitter:image. Those image URLs now 308-redirect, and some crawlers don't follow redirects when fetching card images. Worth normalizing to www. in a follow-up.
  2. Redirect match is exact-hostname only (url.hostname === 'runesswap.app'), so workers.dev and the wildcard *.runesswap.app (still CNAMEd to Vercel per the rollback table) bypass it. That appears intentional, but if the wildcard record is ever pointed at the Worker, subdomains would serve the app directly instead of redirecting — just something to be aware of.
  3. Doc nit: line 20 says "Verify TLS, redirects, pages, static assets, and APIs after deployments" — good, but the rollback table still says records are "unproxied"; worth confirming that's still accurate for the wildcard record now that the zone is fully live (it may have been written pre-cutover).

No bugs found. The change is the smallest possible correct expression of the cutover, and the risk-bearing pieces (redirect, tests, rollback path) were already in place.

New%20session%20-%202026-09-07T06%3A37%3A30.330Z
opencode session  |  github run

@robin-liquidium
robin-liquidium merged commit ec12abe into main Sep 7, 2026
7 of 8 checks passed
@robin-liquidium
robin-liquidium deleted the codex/cloudflare-domain-cutover branch September 7, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant