Back to Next Js

crossOrigin

docs/01-app/03-api-reference/05-config/01-next-config-js/crossOrigin.mdx

16.2.5840 B
Original Source

Use the crossOrigin option to add a crossOrigin attribute in all <script> tags generated by the <AppOnly>next/script component</AppOnly> <PagesOnly>next/script and next/headcomponents</PagesOnly>, and define how cross-origin requests should be handled.

js
module.exports = {
  crossOrigin: 'anonymous',
}

Options