2023-07-05 14:11:16 +01:00
|
|
|
---
|
|
|
|
|
title: '`Head` or `NextScript` attribute `crossOrigin` is deprecated'
|
|
|
|
|
---
|
2018-12-12 18:05:21 -06:00
|
|
|
|
2023-07-05 14:11:16 +01:00
|
|
|
## Why This Error Occurred
|
2018-12-12 18:05:21 -06:00
|
|
|
|
|
|
|
|
This option has been moved to `next.config.js`.
|
|
|
|
|
|
2023-07-05 14:11:16 +01:00
|
|
|
## Possible Ways to Fix It
|
2018-12-12 18:05:21 -06:00
|
|
|
|
|
|
|
|
Add the config option:
|
|
|
|
|
|
2023-07-05 14:11:16 +01:00
|
|
|
```js filename="next.config.js"
|
2018-12-12 18:05:21 -06:00
|
|
|
module.exports = {
|
2019-05-29 13:57:26 +02:00
|
|
|
crossOrigin: 'anonymous',
|
2018-12-12 18:05:21 -06:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2023-07-05 14:11:16 +01:00
|
|
|
## Useful Links
|
2018-12-12 18:05:21 -06:00
|
|
|
|
2020-05-27 17:51:11 -04:00
|
|
|
- [The issue this was reported in: #5674](https://github.com/vercel/next.js/issues/5674)
|