Skip to content

Commit

Permalink
Loosen for workers
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite committed Mar 3, 2024
1 parent 5130e6c commit 429e81a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions angular-workspace/projects/example-client-app/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ module.exports = function (config) {
customHeaders: [
// Add a Content-Security-Policy header for the tests
// Following: https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy
// Need 'unsafe-inline' to support karma behavior: https://github.com/karma-runner/karma/issues/3260
// Need script-src 'unsafe-inline' to support karma behavior
// See https://github.com/karma-runner/karma/issues/3260
// Need worker-src blob: to support current worker loading pattern
{
match: '\\.html',
name: 'Content-Security-Policy',
value: "script-src 'self' 'unsafe-inline'; object-src 'self';"
value: "script-src 'self' 'unsafe-inline'; object-src 'self'; worker-src 'self' blob: ;"
}
]
});
Expand Down
6 changes: 4 additions & 2 deletions angular-workspace/projects/ni/nimble-angular/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ module.exports = config => {
customHeaders: [
// Add a Content-Security-Policy header for the tests
// Following: https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy
// Need 'unsafe-inline' to support karma behavior: https://github.com/karma-runner/karma/issues/3260
// Need script-src 'unsafe-inline' to support karma behavior
// See https://github.com/karma-runner/karma/issues/3260
// Need worker-src blob: to support current worker loading pattern
{
match: '\\.html',
name: 'Content-Security-Policy',
value: "script-src 'self' 'unsafe-inline'; object-src 'self';"
value: "script-src 'self' 'unsafe-inline'; object-src 'self'; worker-src 'self' blob: ;"
}
]
});
Expand Down
6 changes: 4 additions & 2 deletions packages/jasmine-parameterized/karma.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ module.exports = config => {
customHeaders: [
// Add a Content-Security-Policy header for the tests
// Following: https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy
// Need 'unsafe-inline' to support karma behavior: https://github.com/karma-runner/karma/issues/3260
// Need script-src 'unsafe-inline' to support karma behavior
// See https://github.com/karma-runner/karma/issues/3260
// Need worker-src blob: to support current worker loading pattern
{
match: '\\.html',
name: 'Content-Security-Policy',
value: "script-src 'self' 'unsafe-inline'; object-src 'self';"
value: "script-src 'self' 'unsafe-inline'; object-src 'self'; worker-src 'self' blob: ;"
}
]
};
Expand Down
6 changes: 4 additions & 2 deletions packages/nimble-components/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ module.exports = config => {
customHeaders: [
// Add a Content-Security-Policy header for the tests
// Following: https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy
// Need 'unsafe-inline' to support karma behavior: https://github.com/karma-runner/karma/issues/3260
// Need script-src 'unsafe-inline' to support karma behavior
// See https://github.com/karma-runner/karma/issues/3260
// Need worker-src blob: to support current worker loading pattern
{
match: '\\.html',
name: 'Content-Security-Policy',
value: "script-src 'self' 'unsafe-inline'; object-src 'self';"
value: "script-src 'self' 'unsafe-inline'; object-src 'self'; worker-src 'self' blob: ;"
}
]
};
Expand Down

0 comments on commit 429e81a

Please sign in to comment.