diff --git a/lib/response.js b/lib/response.js index dd33e42..1313f9f 100644 --- a/lib/response.js +++ b/lib/response.js @@ -226,7 +226,8 @@ function showPublishNote (req, res, next) { robots: meta.robots || false, // default allow robots GA: meta.GA, disqus: meta.disqus, - cspNonce: res.locals.nonce + cspNonce: res.locals.nonce, + dnt: req.headers.dnt } return renderPublish(data, res) }).catch(function (err) { @@ -608,7 +609,8 @@ function showPublishSlide (req, res, next) { robots: meta.robots || false, // default allow robots GA: meta.GA, disqus: meta.disqus, - cspNonce: res.locals.nonce + cspNonce: res.locals.nonce, + dnt: req.headers.dnt } return renderPublishSlide(data, res) }).catch(function (err) { diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 9604d42..1970ab2 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -63,7 +63,7 @@
- <% if(typeof disqus !== 'undefined' && disqus) { %> + <% if(typeof disqus !== 'undefined' && disqus && !dnt) { %>