Blog

Remix resource routes: CORS headers on loaders and actions, webhooks, and same-origin JSON APIs

Resource routes can serve cross-origin webhooks—emit CORS only on routes that external browsers or servers call.

1 min read
remixcorsfull-stack

Single fetch

Remix’s single-fetch model batches data—ensure deferred promises do not strip CORS headers on error boundaries.

Streaming SSR with Suspense should still flush Vary: Origin early for credentialed loaders.

Deployment targets

Cloudflare Workers and Node adapters differ in header limits—test OPTIONS size after adding custom headers.

Vercel edge functions may cold-start slower than Node—watch preflight latency SLOs.

Back to blog