We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b53d00 commit f1f8350Copy full SHA for f1f8350
server/document.js
@@ -117,6 +117,10 @@ export class Main extends Component {
117
}
118
119
export class NextScript extends Component {
120
+ static propTypes = {
121
+ nonce: PropTypes.string
122
+ }
123
+
124
static contextTypes = {
125
_documentProps: PropTypes.any
126
@@ -176,7 +180,7 @@ export class NextScript extends Component {
176
180
__NEXT_DATA__.chunks = chunks
177
181
178
182
return <div>
179
- {staticMarkup ? null : <script dangerouslySetInnerHTML={{
183
+ {staticMarkup ? null : <script nonce={this.props.nonce} dangerouslySetInnerHTML={{
184
__html: `
185
__NEXT_DATA__ = ${htmlescape(__NEXT_DATA__)}
186
module={}
0 commit comments