javascript - 由于“X-frame-options”设置为“拒绝”,Facebook 评论在网站的所有页面上被禁用
问题描述
我在我网站的每个页面上都使用 Facebook 评论,使用他们的评论插件。
最近,我注意到每个网页上的评论都停止显示,在控制台中出现以下错误:
Refused to display [url] in a frame because it set 'X-Frame-Options' to 'deny'.
完整错误:
Refused to display 'https://www.facebook.com/plugins/feedback.php?app_id&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D44%23cb%3Df2f5722dfd41%26domain%3Dtheinternet.io%26origin%3Dhttps%253A%252F%252Ftheinternet.io%252Ffb2882a8d21d58%26relation%3Dparent.parent&container_width=1904&height=100&href=https%3A%2F%2Ftheinternet.io%2Ftest-page.html&locale=en_US&numposts=5&sdk=joey&version=v3.3&width=550' in a frame because it set 'X-Frame-Options' to 'deny'.
此外,当我将网站中的任何 url 放入Facebook 的 Comments Plugin Code Generator中时,甚至不会显示评论框的示例。
按照这篇文章中的建议,我尝试设置指向 target="_top" 的链接,但这并没有改变任何东西。
如果你想重现问题,这里有一个测试页。
解决方案
检查共享调试器后,发现我的网站因不符合社区标准而被阻止,收到此错误:“我们无法审查此网站,因为内容不符合我们的社区标准。如果您认为这是一个错误, 请告诉我们。”
推荐阅读
- traefik - Traefik LetsEncrypt 抛出错误:DNS 名称没有足够的标签,url
- html - 将按钮固定到 flexbox 列布局的底部,margin-top:auto 不起作用
- java - 创建一个抽象类并推断子类的私有属性
- python - 使用 Beautiful Soup 模块打印数据单独的行
- cpu - 英特尔涡轮增压驱动程序要求
- .net-core - 始终使用 ODBC 和 Azure Vault 加密查询
- java - 三星 Galaxy 手机常用于请勿打扰(派)
- apache-spark - 如何对 Spark Streaming 生成的分区 parquet 文件进行适当的内务管理
- python - Azure Functions Python - 部署项目,该项目使用安装脚本导入自己的 python 包
- phaser-framework - 如何在 Phaser 3 中创建动画按钮?