Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Set CSP on karma to prevent 'evalError' regression (#4706)

JeongHoon Byun (a.k.a Outsider)09ffc30b43db
diff --git a/karma.conf.js b/karma.conf.js
index f94dbdba..46ce0ab2 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -72,6 +72,13 @@ const baseConfig = {
mochaReporter: {
showDiff: true
},
+ customHeaders: [
+ {
+ match: '.*.html',
+ name: 'Content-Security-Policy',
+ value: "script-src https: 'self' 'unsafe-inline'"
+ }
+ ],
customLaunchers: {
ChromeDebug: {
base: 'Chrome',