next.config.js CORS headers not present for `/_next/static` assets from migrating from next 12 -> 14
Unanswered
Gray-tailed Tattler posted this in #help-forum
Gray-tailed TattlerOP
Hey,
having trouble with upgrading from next 12.3.4 --> 14.2.4 (tried different minor/patch releases) that assets via
So I'm not sure if expected or a bug?
having trouble with upgrading from next 12.3.4 --> 14.2.4 (tried different minor/patch releases) that assets via
/_next/static no longer use the headers defined in next.config.js around CORS headers. I'm serving certain "public" folder and next.js generated assets via different subdomain via assetsUri so CORS headers are important for it . Went trough all release logs and docs and don't see any mentions about this regression.So I'm not sure if expected or a bug?
1 Reply
Gray-tailed TattlerOP
More context, I'm using standalone mode.
Also noticed that my pages router middleware no longer runs against
From docs I noticed that it should run - https://nextjs.org/docs/app/building-your-application/routing/middleware#matching-paths
Also noticed that my pages router middleware no longer runs against
/_next/static/* resources.From docs I noticed that it should run - https://nextjs.org/docs/app/building-your-application/routing/middleware#matching-paths