Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Load landing chunks from the asset host in CORS mode (#3600)

Luke Vella7de77c163849
diff --git a/apps/landing/next.config.ts b/apps/landing/next.config.ts
index d284bab21..d448c4c80 100644
--- a/apps/landing/next.config.ts
+++ b/apps/landing/next.config.ts
@@ -21,6 +21,12 @@ const nextConfig: NextConfig = {
// Serves /_next/static from a CDN-cached host to keep the immutable
// bundles off Vercel's bandwidth bill. Unset outside production.
assetPrefix: process.env.NEXT_PUBLIC_ASSET_PREFIX,
+ // Loads chunks from that host as CORS requests instead of opaque no-cors
+ // ones. Since the move, WebKit has kept broken cached copies of the opaque
+ // chunks, which stops the page from hydrating. The asset host must send
+ // Access-Control-Allow-Origin on every response, or no browser will run
+ // the scripts.
+ crossOrigin: process.env.NEXT_PUBLIC_ASSET_PREFIX ? "anonymous" : undefined,
transpilePackages: [
"@rallly/ui",
"@rallly/tailwind-config",