Skip to content

Commit

Permalink
fix: discourseReferrerPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Aug 26, 2024
1 parent f53364f commit 2b5b8d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/.vuepress/theme/components/blog/Comments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ export default {
window.DiscourseEmbed = {
discourseUrl: 'https://discuss.ipfs.tech/',
discourseEmbedUrl: safePermalink(this.$frontmatter.permalink, this.$frontmatter.date),
discourseReferrerPolicy: 'strict-origin-when-cross-origin', // https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963#setting-the-referrer-policy-7
}
const d = document.createElement('script')
d.type = 'text/javascript'
d.async = true
d.src = window.DiscourseEmbed.discourseUrl + 'javascripts/embed.js'
document.getElementsByTagName('body')[0].appendChild(d)
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d)
},
}
</script>

0 comments on commit 2b5b8d4

Please sign in to comment.