summaryrefslogtreecommitdiff
path: root/public/views/shared/disqus.ejs
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-04-05 01:13:15 +0200
committerGitHub2018-04-05 01:13:15 +0200
commit96af23fa31cd3d4e4f50ad2e66a500f5e88ad64f (patch)
treebf43b699f0913e28ed8de0e2c9410708538c04c7 /public/views/shared/disqus.ejs
parenta9a057723021ac4833ae665d0321c03564281b9e (diff)
parentd939de17df08b7a2ff8302869981f4fc88566cd9 (diff)
Merge pull request #791 from SISheogorath/fix/extendedCSPPolicies
Fix CSP for disqus and Google Analytics
Diffstat (limited to '')
-rw-r--r--public/views/shared/disqus.ejs5
1 files changed, 2 insertions, 3 deletions
diff --git a/public/views/shared/disqus.ejs b/public/views/shared/disqus.ejs
index cceaa85c..840d1e38 100644
--- a/public/views/shared/disqus.ejs
+++ b/public/views/shared/disqus.ejs
@@ -1,14 +1,13 @@
<div id="disqus_thread"></div>
-<script>
+<script nonce="<%= cspNonce %>">
var disqus_config = function () {
this.page.identifier = window.location.pathname.split('/').slice(-1)[0];
};
(function() {
var d = document, s = d.createElement('script');
- s.src = '//<%= disqus %>.disqus.com/embed.js';
+ s.src = 'https://<%= disqus %>.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
- \ No newline at end of file