Skip to content

Commit

Permalink
FACT-1985 removed gstatic from CSP instead (#799)
Browse files Browse the repository at this point in the history
* removed unsafe-eval and unsafe-inline

* removed gstatic from fontSrc and imgSrc

* http-proxy-middleware update

* trying to remove unsafe-eval only

* poke

* undo unsafe eval removal

* poke
  • Loading branch information
justiceia authored Oct 29, 2024
1 parent bc588e7 commit cbec0aa
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
17 changes: 12 additions & 5 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,4 @@ e.g. the ones verifying the state of each service it depends on.
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"glob-parent": "6.0.2",
"govuk-frontend": "^4.8.0",
"helmet": "^4.6.0",
"http-proxy-middleware": "^2.0.6",
"http-proxy-middleware": "^2.0.7",
"i18next": "^21.8.14",
"i18next-http-middleware": "^3.2.1",
"jquery": "^3.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/main/modules/helmet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class Helmet {
directives: {
connectSrc: [self, googleAnalyticsDomain, doubleclick, 'https://*.dynatrace.com'],
defaultSrc: ["'none'"],
fontSrc: [self, 'data:', 'https://fonts.gstatic.com'],
imgSrc: [self, azureBlob, ...tagManager, googleAnalyticsDomain, 'data:', 'https://ssl.gstatic.com', 'https://www.gstatic.com', 'https://*.dynatrace.com'],
fontSrc: [self, 'data:'],
imgSrc: [self, azureBlob, ...tagManager, googleAnalyticsDomain, 'data:', 'https://*.dynatrace.com'],
objectSrc: [self],
scriptSrc: [self, ...tagManager, googleAnalyticsDomain, "'unsafe-inline'", "'unsafe-eval'", 'https://*.dynatrace.com'],
styleSrc: [self, ...tagManager, "'unsafe-inline'", 'https://fonts.googleapis.com'],
Expand Down
22 changes: 20 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6387,7 +6387,7 @@ __metadata:
govuk-frontend: ^4.8.0
helmet: ^4.6.0
html-webpack-plugin: ^5.6.0
http-proxy-middleware: ^2.0.6
http-proxy-middleware: ^2.0.7
i18next: ^21.8.14
i18next-http-middleware: ^3.2.1
jest: ^28.1.3
Expand Down Expand Up @@ -7502,7 +7502,7 @@ __metadata:
languageName: node
linkType: hard

"http-proxy-middleware@npm:*, http-proxy-middleware@npm:^2.0.6":
"http-proxy-middleware@npm:*":
version: 2.0.6
resolution: "http-proxy-middleware@npm:2.0.6"
dependencies:
Expand All @@ -7520,6 +7520,24 @@ __metadata:
languageName: node
linkType: hard

"http-proxy-middleware@npm:^2.0.7":
version: 2.0.7
resolution: "http-proxy-middleware@npm:2.0.7"
dependencies:
"@types/http-proxy": ^1.17.8
http-proxy: ^1.18.1
is-glob: ^4.0.1
is-plain-obj: ^3.0.0
micromatch: ^4.0.2
peerDependencies:
"@types/express": ^4.17.13
peerDependenciesMeta:
"@types/express":
optional: true
checksum: 18caa21145917aa1054740353916e8f03f5a3a93bede9106f1f44d84f7b174df17af1c72bf5fade5cc440c2058ee813f47cbb2bdd6ae6874af1cf33e0ac575f3
languageName: node
linkType: hard

"http-proxy@npm:^1.18.1":
version: 1.18.1
resolution: "http-proxy@npm:1.18.1"
Expand Down

0 comments on commit cbec0aa

Please sign in to comment.