Skip to content

Commit fc66266

Browse files
committed
fix: only enable dropbox directives when config is given
Signed-off-by: Max Wu <[email protected]>
1 parent e2c31e4 commit fc66266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/csp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ CspStrategy.computeDirectives = function () {
4141
mergeDirectives(directives, config.csp.directives)
4242
mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives)
4343
mergeDirectivesIf(config.useCDN, directives, cdnDirectives)
44-
mergeDirectivesIf(config.dropbox.appKey, directives, dropboxDirectives)
44+
mergeDirectivesIf(config.dropbox && config.dropbox.appKey, directives, dropboxDirectives)
4545
mergeDirectivesIf(config.csp.addDisqus, directives, disqusDirectives)
4646
mergeDirectivesIf(config.csp.addGoogleAnalytics, directives, googleAnalyticsDirectives)
4747
if (!areAllInlineScriptsAllowed(directives)) {

0 commit comments

Comments
 (0)