Unverified Commit 6f5e0f36 authored by Thomas Danecker's avatar Thomas Danecker Committed by GitHub

Don't emit crossorigin attributes for `output: "export"` by default (#61211)

In other output modes, link and script tags do not contain a crossorigin
attribute by default.

When using output: "export", it should also follow the other output
modes, to avoid unnecessary CORS issues, especially when hosting the
assets on a different domain (i.e. a CDN).

fixes #61210
Co-authored-by: 's avatarSteven <steven@ceriously.com>
parent 1cb3b4e2
...@@ -399,7 +399,7 @@ export async function exportAppImpl( ...@@ -399,7 +399,7 @@ export async function exportAppImpl(
disableOptimizedLoading: nextConfig.experimental.disableOptimizedLoading, disableOptimizedLoading: nextConfig.experimental.disableOptimizedLoading,
// Exported pages do not currently support dynamic HTML. // Exported pages do not currently support dynamic HTML.
supportsDynamicHTML: false, supportsDynamicHTML: false,
crossOrigin: nextConfig.crossOrigin || '', crossOrigin: nextConfig.crossOrigin,
optimizeCss: nextConfig.experimental.optimizeCss, optimizeCss: nextConfig.experimental.optimizeCss,
nextConfigOutput: nextConfig.output, nextConfigOutput: nextConfig.output,
nextScriptWorkers: nextConfig.experimental.nextScriptWorkers, nextScriptWorkers: nextConfig.experimental.nextScriptWorkers,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment