Skip to main content

Domain Migration — July 2026

This page documents the domain migration completed on July 6, 2026, which moved the RoundTrip React application from roundtrips.app to app.roundtrips.app and pointed roundtrips.app at the Astro marketing site.


What Changed

BeforeAfter
roundtrips.app → React approundtrips.app → Astro marketing site
No app.roundtrips.appapp.roundtrips.app → React app

Migration Steps

1. Add app.roundtrips.app to Cloudflare Pages

  • Cloudflare Pages → roundtrip project → Custom domains → Add app.roundtrips.app
  • Cloudflare automatically added the DNS CNAME record
  • Waited for status to go Active (~2 minutes)

2. Update Entra Redirect URIs

  • Azure Portal → roundtripapp tenant → App registrations → RoundTrip Web Client
  • Added two new redirect URIs:
    • https://app.roundtrips.app
    • https://app.roundtrips.app/auth/callback
  • Kept existing roundtrips.app URIs in place during migration

3. Update App Service Configuration

az webapp config appsettings set \
--name app-roundtrip-production \
--resource-group rg-roundtrip-production \
--settings App__BaseUrl="https://app.roundtrips.app"

4. Update ADO Pipeline Variable

  • ADO → RoundTripWeb pipeline → Variables
  • Updated VITE_ENTRA_REDIRECT_URI from https://roundtrips.app to https://app.roundtrips.app
  • Re-ran the pipeline to bake the new value into the build

5. Update CORS in RoundTrip API

Added https://app.roundtrips.app to the allowed origins in the CORS policy.

6. Update GraphUserService

  • Changed InviteRedirectUrl from https://roundtrips.app to https://app.roundtrips.app
  • Fixed SendInvitationMessage from true to false (see TRA-339)

7. Cut over roundtrips.app to marketing site

  • Cloudflare Pages → roundtrip project → Custom domains → Remove roundtrips.app
  • Cloudflare Pages → roundtrip-marketing project → Custom domains → Add roundtrips.app

Critical Lessons Learned

ADO Pipeline Variables Are the Only Source of Truth for Vite Env Vars

danger

The Cloudflare Pages dashboard environment variables and local .env.production files are completely ignored during CI builds. The ADO pipeline env: block overrides everything.

If a Vite env var isn't working after a deployment, check the ADO pipeline variables — not Cloudflare or local files.

The build step explicitly passes ADO variables:

- script: npm run build
env:
VITE_ENTRA_REDIRECT_URI: $(VITE_ENTRA_REDIRECT_URI)
# ... other vars

See Frontend Environment Variables for full details.

NuGet Audit Level

During the migration, the pipeline failed due to Scriban 7.2.0 moderate severity vulnerabilities. Since there is no patched version available and Scriban is used with trusted server-side templates only (not attacker-controlled input), the NuGet audit level was set to high in Directory.Build.props:

<NuGetAuditLevel>high</NuGetAuditLevel>

This allows moderate vulnerabilities to pass while still blocking high and critical ones.


Bugs Fixed During Migration

TRA-339 — Entra Sending Duplicate Invitation Email

Root cause: SendInvitationMessage = true in GraphUserService.InviteUserAsync — the comment said "We send our own welcome email" but the flag was set to true, causing Entra to send its own invitation email in addition to our SendGrid welcome email.

Fix: Changed SendInvitationMessage to false and updated InviteRedirectUrl to https://app.roundtrips.app.

File: src/RoundTrip.API.Infrastructure/Identity/GraphUserService.cs

TRA-340 — Service Worker White Screen After Deployments

Root cause: registerType: 'autoUpdate' combined with clientsClaim() caused the new service worker to immediately take control of all open tabs during an auth redirect, resulting in a white "Signing you in" screen with no recovery path.

Fix:

  1. Changed registerType to 'prompt' in vite.config.ts
  2. Added SKIP_WAITING message handler to sw.ts
  3. Added controlled update detection in main.tsx — new SW sends SKIP_WAITING to itself when ready, then reloads the page cleanly after taking control

Files: vite.config.ts, src/sw.ts, src/main.tsx


Post-Migration Checklist

After any future domain changes, verify:

  • Entra redirect URIs updated in RoundTrip Web Client app registration
  • VITE_ENTRA_REDIRECT_URI updated in ADO pipeline variables (not Cloudflare or local files)
  • CORS allowed origins updated in RoundTrip API
  • GraphUserService.InviteRedirectUrl updated
  • App__BaseUrl App Service setting updated
  • Test login in a fresh incognito window after deployment
  • Verify redirect_uri parameter in Entra auth request via Network tab

Current Domain Map

URLPoints ToPurpose
roundtrips.approundtrip-marketing Cloudflare PagesMarketing site
app.roundtrips.approundtrip Cloudflare PagesReact application
dev.roundtrips.approundtrip-dev Cloudflare PagesDevelopment environment
api.roundtrips.appapp-roundtrip-production Azure App ServiceProduction API
docs.roundtrips.approundtrip-docs Cloudflare PagesPublic documentation
help.roundtrips.appCrisp Help CenterCustomer knowledge base
support.roundtrips.appCrisp email routing (MX)Support email
traxsgroup.comtraxsgroup Cloudflare PagesCompany website
ops.traxsgroup.comroundtrip-internal Cloudflare PagesInternal ops manual
api.traxsgroup.comapp-commandcenter-production Azure App ServiceCommand Center API