Добавлено nonce поле для скрипта, исправляющего fetch в Edge

This commit is contained in:
ErickSkrauch 2018-01-28 13:41:38 +03:00
parent 81b3da18aa
commit 9c975aa8cf
2 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,7 @@
<link rel="shortcut icon" href="<%= htmlWebpackPlugin.files.favicon %>">
<% } %>
<script>
<script nonce="edge-must-die">
if (/Edge\/(must die)?/.test(navigator.userAgent)) {
// Edge has a broken fetch implementation, so forcing the polyfill
// https://www.reddit.com/r/webdev/comments/57ii4f/psa_edge_14_ships_a_broken_windowfetch/

View File

@ -323,6 +323,7 @@ if (isCspEnabled) {
'style-src': ['\'self\'', '\'unsafe-inline\''],
'script-src': [
'\'self\'',
'\'nonce-edge-must-die\'',
'\'unsafe-inline\'',
'https://www.google-analytics.com',
'https://www.google.com/recaptcha/',