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