@@ -79,10 +79,6 @@ function mergeDirectivesIf (condition, existingDirectives, newDirectives) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function areAllInlineScriptsAllowed (directives) {
|
|
||||||
return directives.scriptSrc.indexOf('\'unsafe-inline\'') !== -1
|
|
||||||
}
|
|
||||||
|
|
||||||
function addInlineScriptExceptions (directives) {
|
function addInlineScriptExceptions (directives) {
|
||||||
directives.scriptSrc.push(getCspNonce)
|
directives.scriptSrc.push(getCspNonce)
|
||||||
// TODO: This is the SHA-256 hash of the inline script in build/reveal.js/plugins/notes/notes.html
|
// 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) {
|
function getCspNonce (req, res) {
|
||||||
return "'nonce-" + res.locals.nonce + "'"
|
return '\'nonce-' + res.locals.nonce + '\''
|
||||||
}
|
}
|
||||||
|
|
||||||
function addUpgradeUnsafeRequestsOptionTo (directives) {
|
function addUpgradeUnsafeRequestsOptionTo (directives) {
|
||||||
|
|||||||
Reference in New Issue
Block a user