From 4cbef4c9ee21a5bdd919c4c5ddf1591825b11d46 Mon Sep 17 00:00:00 2001 From: ivanauth Date: Mon, 13 Jul 2026 10:03:03 -0400 Subject: [PATCH] Serve assets from the same origin as pages The production assetPrefix pointed at docs-authzed.vercel.app, so pages loaded from authzed.com pulled their assets from a second domain, which breaks for users behind restrictive firewalls. The authzed.com rewrite already proxies everything under /docs, including /docs/_next/static assets, so the prefix is unnecessary: relative asset URLs resolve same-origin through the existing rewrite. With no cross-origin asset domain left, the crossOrigin setting added for the CDN domain is no longer needed either. --- next.config.mjs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 102ee3aa..fe9470ca 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -79,11 +79,6 @@ export default withNextra({ }, ]; }, - // This is necessary because we're using CDN domains. - // It adds `cross-origin="anonymous"` to script tags - crossOrigin: "anonymous", - assetPrefix: - process.env.VERCEL_ENV === "production" ? "https://docs-authzed.vercel.app/docs" : undefined, // NOTE: we still use webpack instead of turbopack for dev // because turbopack doesn't support non-serializable nextjs options. // The rehypePrettyCodeOptions in the block above include a function,