Disqus 如何知道我是我假装的网站?

How does Disqus know that I am the website I am pretending to be?

我正在将 Disqus 添加到我的网站并使用通用代码。

here

我在 mywebsite.disqus.com/embed.js.

得到他们的 javascript

Disqus 怎么知道我是 mywebsite.com 而不是另一个人? 是什么阻止其他人使用此 javascript 嵌入?

我猜他们检查来源 URL 以验证请求来自 mywebsite.com。

他们还使用哪些其他支票?

根据您链接的页面上的文档,您必须提供 PAGE_IDENTIFIER

// Replace PAGE_IDENTIFIER with your page's unique identifier variable
this.page.identifier = PAGE_IDENTIFIER; 

接着解释

this.page.identifier tells Disqus a unique value, used to identify the page and discussion thread

是的,理论上其他人可以复制您的标识符并将其嵌入到他们的站点中。但是,Discus 可能会使用交叉原点 header 来防止这种情况,以确保只有您可以加载以下 URL.

// IMPORTANT: Replace EXAMPLE with your forum shortname!
s.src = 'https://EXAMPLE.disqus.com/embed.js';

您的短代码可能与 Discus 后端中的一个域相关联,因此当您调用带有您的短代码的唯一 URL 时,该请求将包含特定的交叉源 header到您的域。