diff --git a/lib/csp.js b/lib/csp.js index 98996073f..cebc050c8 100644 --- a/lib/csp.js +++ b/lib/csp.js @@ -79,10 +79,6 @@ function mergeDirectivesIf (condition, existingDirectives, newDirectives) { } } -function areAllInlineScriptsAllowed (directives) { - return directives.scriptSrc.indexOf('\'unsafe-inline\'') !== -1 -} - function addInlineScriptExceptions (directives) { directives.scriptSrc.push(getCspNonce) // TODO: This is the SHA-256 hash of the inline script in build/reveal.js/plugins/notes/notes.html @@ -91,7 +87,7 @@ function addInlineScriptExceptions (directives) { } function getCspNonce (req, res) { - return "'nonce-" + res.locals.nonce + "'" + return '\'nonce-' + res.locals.nonce + '\'' } function addUpgradeUnsafeRequestsOptionTo (directives) {