Blog

Railway and Render: environment variables, preview URLs, and CORS in production versus staging

Map ALLOWED_ORIGINS from secrets per environment; never commit wildcard production origins to public repos.

1 min read
railwayrendercors

Monorepo deploys

Trigger dependent services when only the frontend changes—CORS regressions appear at integration boundaries.

Use health checks that include OPTIONS success for critical routes.

Cost controls

Sleeping services may cold start on first browser preflight—watch p95 OPTIONS latency.

Cap concurrent builds so staging never points to half-deployed backends.

Back to blog