Skip to content

Commit

Permalink
feat(FEC-14380): add nonce to style tags (#65)
Browse files Browse the repository at this point in the history
### Description of the Changes

Resolves FEC-14380

### CheckLists

- [ ] changes have been done against master branch, and PR does not
conflict
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] test are passing in local environment
- [ ] Travis tests are passing (or test results are not worse than on
master branch :))
- [ ] Docs have been updated
  • Loading branch information
lianbenjamin authored Mar 3, 2025
1 parent b1ecaa0 commit e5579ed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@babel/preset-env": "^7.10.4",
"@babel/preset-flow": "^7.10.4",
"@babel/register": "^7.10.5",
"@playkit-js/kaltura-player-js": "3.17.16-canary.0-db12b53",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-istanbul": "^6.0.0",
Expand All @@ -75,7 +76,6 @@
"flow-bin": "^0.129.0",
"husky": "^4.2.5",
"istanbul": "^0.4.5",
"@playkit-js/kaltura-player-js": "3.17.16-canary.0-db12b53",
"karma": "^5.1.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
Expand Down Expand Up @@ -118,5 +118,8 @@
"dependencies": {
"playkit-ui-managers": "1.7.0"
}
},
"dependencies": {
"@playkit-js/webpack-common": "^1.0.1-canary.0-9fd715a"
}
}
8 changes: 7 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const webpack = require('webpack');
const path = require('path');
const packageData = require('./package.json');
const CSS_MODULE_PREFIX = 'playkit';
const {insertStylesWithNonce} = require('@playkit-js/webpack-common');

let plugins = [
new webpack.DefinePlugin({
Expand Down Expand Up @@ -57,7 +58,12 @@ module.exports = {
use: [
{
loader: 'style-loader',
options: {attributes: {id: `${packageData.name}`}}
options: {
attributes: {
id: `${packageData.name}`
},
insert: insertStylesWithNonce
}
},
{
loader: 'css-loader',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@
js-logger "^1.6.0"
ua-parser-js "^1.0.36"

"@playkit-js/webpack-common@^1.0.1-canary.0-9fd715a":
version "1.0.1-canary.0-9fd715a"
resolved "https://registry.yarnpkg.com/@playkit-js/webpack-common/-/webpack-common-1.0.1-canary.0-9fd715a.tgz#b2ad08a69f2366da99a4797cb53ab38f8db5afe9"
integrity sha512-ctYW6lkFxGvZlS826GE7z4d1dcuoTJ3TkcuLe8LWsETQc1jhOW8IT5k261TO1S+ZWsVVDX7YzwCEnGWJbQTdAg==

"@sindresorhus/is@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
Expand Down

0 comments on commit e5579ed

Please sign in to comment.