DEV: update theme-qunit to work with strict-dynamic CSP (#26053)

This commit is contained in:
David Taylor 2024-03-06 13:01:23 +00:00 committed by GitHub
parent 00a5f67daf
commit 30a3e21463
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -11,6 +11,6 @@ module QunitHelper
"#{Discourse.base_path}" \
"/theme-javascripts/tests/#{theme.id}-#{digest}.js" \
"?__ws=#{Discourse.current_hostname}"
"<script defer src='#{src}' data-theme-id='#{theme.id}'></script>".html_safe
"<script defer src='#{src}' data-theme-id='#{theme.id}' nonce='#{csp_nonce_placeholder}'></script>".html_safe
end
end

View File

@ -41,7 +41,7 @@
<%- end %>
<%- if params['testem'] %>
<script defer src="/assets/testem.js"></script>
<script defer src="/assets/testem.js" nonce="<%= csp_nonce_placeholder %>"></script>
<%- end %>
</head>
<body>