Skip to content

Commit 763b000

Browse files
authored
Merge pull request #985 from SISheogorath/fix/helmetCSP
Add `data:` URL to CSP and upgrade helmet
2 parents 4bce4b1 + d4a9bb3 commit 763b000

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/csp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var defaultDirectives = {
99
// ^ TODO: Remove unsafe-eval - webpack script-loader issues https://github.com/hackmdio/codimd/issues/594
1010
imgSrc: ['*'],
1111
styleSrc: ['\'self\'', '\'unsafe-inline\'', 'https://assets-cdn.github.com'], // unsafe-inline is required for some libs, plus used in views
12-
fontSrc: ['\'self\'', 'https://public.slidesharecdn.com'],
12+
fontSrc: ['\'self\'', 'data:', 'https://public.slidesharecdn.com'],
1313
objectSrc: ['*'], // Chrome PDF viewer treats PDFs as objects :/
1414
mediaSrc: ['*'],
1515
childSrc: ['*'],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"gist-embed": "~2.6.0",
4848
"graceful-fs": "^4.1.11",
4949
"handlebars": "^4.0.6",
50-
"helmet": "^3.3.0",
50+
"helmet": "^3.13.0",
5151
"highlight.js": "~9.12.0",
5252
"i18n": "^0.8.3",
5353
"imgur": "git+https://github.com/hackmdio/node-imgur.git",

0 commit comments

Comments
 (0)