Skip to content

Commit 04a49a6

Browse files
committed
fix(csp): passed the nonce to the inline script for rehydrating on the client
this allows the browser to match the nonce to the one in the csp definition and safely allow the inline script to execute for #918
1 parent 145fde5 commit 04a49a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/server/view/layout.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<div id="wrap"><div>{{{ renderedContent }}}</div></div>
12-
<script>__INITIAL_STATE__ = '{{{ initialState }}}'; {{#boom}}__BOOM__ = {{/boom}}{{{boom}}}</script>
12+
<script nonce="{{ script-nonce }}">__INITIAL_STATE__ = '{{{ initialState }}}'; {{#boom}}__BOOM__ = {{/boom}}{{{boom}}}</script>
1313
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"> </script>
1414
<script src="{{ resources.main.js }}"> </script>
1515
</body>

0 commit comments

Comments
 (0)