Blog

Astro server islands: CORS for deferred HTML fragments, hybrid rendering, and client-side fetch after hydration

Islands may request JSON from a separate API—ensure CORS headers on the API match the page’s public origin.

1 min read
astroserver-islandscors

View transitions

SPA-style navigation after View Transitions can re-trigger cross-origin fetches—retest CORS on each route.

Persistent elements may keep stale `fetch` caches—bust cache after auth changes.

Adapters

Node adapter versus serverless differ in header size limits—large Allow-Headers lists can fail silently.

Image optimization endpoints need CORS if loaded from another subdomain in multi-zone setups.

Back to blog