mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-08-08 18:03:04 +02:00
fix: discourseReferrerPolicy
https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963#setting-the-referrer-policy-7 https://developer.chrome.com/blog/referrer-policy-new-chrome-default
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user