summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.js b/app.js
index 01ecc84c..8664707d 100644
--- a/app.js
+++ b/app.js
@@ -171,7 +171,9 @@ if (config.csp.enable) {
)
}
}
- directives.scriptSrc.push(getCspNonce)
+ if (directives.scriptSrc.indexOf('\'unsafe-inline\'') === -1) {
+ directives.scriptSrc.push(getCspNonce)
+ }
directives.connectSrc.push(getCspWebSocketUrl)
if (config.csp.upgradeInsecureRequests === 'auto') {
directives.upgradeInsecureRequests = config.usessl === 'true'