mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
Merge pull request #104 from SISheogorath/feature/dnt
Respect DNT header
This commit is contained in:
commit
1bfed17f8c
4 changed files with 7 additions and 5 deletions
|
@ -226,7 +226,8 @@ function showPublishNote (req, res, next) {
|
||||||
robots: meta.robots || false, // default allow robots
|
robots: meta.robots || false, // default allow robots
|
||||||
GA: meta.GA,
|
GA: meta.GA,
|
||||||
disqus: meta.disqus,
|
disqus: meta.disqus,
|
||||||
cspNonce: res.locals.nonce
|
cspNonce: res.locals.nonce,
|
||||||
|
dnt: req.headers.dnt
|
||||||
}
|
}
|
||||||
return renderPublish(data, res)
|
return renderPublish(data, res)
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
|
@ -608,7 +609,8 @@ function showPublishSlide (req, res, next) {
|
||||||
robots: meta.robots || false, // default allow robots
|
robots: meta.robots || false, // default allow robots
|
||||||
GA: meta.GA,
|
GA: meta.GA,
|
||||||
disqus: meta.disqus,
|
disqus: meta.disqus,
|
||||||
cspNonce: res.locals.nonce
|
cspNonce: res.locals.nonce,
|
||||||
|
dnt: req.headers.dnt
|
||||||
}
|
}
|
||||||
return renderPublishSlide(data, res)
|
return renderPublishSlide(data, res)
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
|
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
|
||||||
<% if(typeof disqus !== 'undefined' && disqus) { %>
|
<% if(typeof disqus !== 'undefined' && disqus && !dnt) { %>
|
||||||
<div class="container-fluid" style="max-width: 758px; margin-bottom: 40px;">
|
<div class="container-fluid" style="max-width: 758px; margin-bottom: 40px;">
|
||||||
<%- include shared/disqus %>
|
<%- include shared/disqus %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if(typeof GA !== 'undefined' && GA) { %>
|
<% if(typeof GA !== 'undefined' && GA && !dnt) { %>
|
||||||
<script nonce="<%= cspNonce %>">
|
<script nonce="<%= cspNonce %>">
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
i['GoogleAnalyticsObject'] = r;
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<% if(typeof disqus !== 'undefined' && disqus) { %>
|
<% if(typeof disqus !== 'undefined' && disqus && !dnt) { %>
|
||||||
<div class="slides-disqus">
|
<div class="slides-disqus">
|
||||||
<%- include shared/disqus %>
|
<%- include shared/disqus %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue