-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage fails to write when using ember-cli-content-security-policy >= 1.1.1 #214
Comments
I found that not setting |
I'm a little bit confused that you are only talking about I'm using a configuration similar to this one with // config/content-security-policy.js
module.exports = function(environment) {
return {
delivery: ['header'],
enabled: true,
failTests: true,
policy: {
'default-src': ["'none'"],
'script-src': [
"'self'",
process.env.COVERAGE ? "'unsafe-inline'" : null,
process.env.COVERAGE ? "'sha256-bOFF6I2TCLkFw5Vfln8TzDOIau151BOflG6fMzQXGY8='" : null,
].filter(Boolean),
'font-src': ["'self'"],
'connect-src': ["'self'"],
'img-src': ["'self'"],
'style-src': ["'self'"],
'media-src': ["'self'"],
},
reportOnly: true,
};
} I researched for other options. If I didn't missed something there isn't a better solution right now. Let me document my finding for others (and for my future self 😆). By default istanbul injects a This can not be used yet. Ember-cli-code-coverage even in latest The Currently ember-cli-code-coverage only supports setting Additionally ember-cli-code-coverage injects a As an alternative the static nonce that is used to fix the To summarize what needs to be done (if I didn't missed something):
|
Just came across this issue, seeing issues with [email protected] and this worked for me. |
Haven't had too much time to dig into it, but the write coverage endpoint seems to be blocked when using ember-cli-content-security-policy >= 1.1.1. Might be enough to document the CSP changes needed to get it working, or detecting the CSP addon and augmenting its config generating coverage reports.
The text was updated successfully, but these errors were encountered: