crossOrigin
Last updated April 15, 2025
Use thecrossOrigin option to add acrossOrigin attribute in all<script> tags generated by thenext/script andnext/headcomponents, and define how cross-origin requests should be handled.
next.config.js
module.exports= { crossOrigin:'anonymous',}Options
'anonymous': AddscrossOrigin="anonymous"attribute.'use-credentials': AddscrossOrigin="use-credentials".
Was this helpful?