Facebook 调试返回 403 Forbidden
我正在尝试通过 Facebook 调试器 运行我的 URL,以查看我是否设置了正确的元标记,而且,看看这些东西总体上是否有效。
当我输入 URL 时,我得到一个 403 Forbidden
作为回报。
URL 指向子域,域本身也会返回 403 Forbidden
。
阅读另一篇文章 指向我网站的 Facebook 链接解析为 403 禁止,我认为我的主机可能设置了一个块或其他东西,但是,我似乎无法从我的计算机重新创建该块。
我一直在尝试欺骗引荐来源网址和用户代理,但没有成功。在致电房东之前,我可能错过了什么?
如果相关,则相关 URL 为: http://distorpia.dadiugames.dk/
I am trying to run my URL through Facebook's Debugger to see if I have setup the correct meta tags, and also, to see that stuff works in general.
When I put my URL in, I get a 403 Forbidden
in return.
The URL is to a subdomain, and the domain itself also returns 403 Forbidden
.
Reading another post Facebook links to my site resolve as 403 forbidden, I think that my host might have setup a block or something, however, I can't seem to recreate the block from my computer.
I have been trying to spoof the referrer and the user agent, but without luck. Before calling my host, what could I have missed?
If it's of relevance the URL in question is: http://distorpia.dadiugames.dk/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我用来测试这个问题的命令是curl -i -H 'Accept: */*' -H 'Range: bytes=0-40960' -H 'Connection: close' -A 'facebookexternalhit/1.1 (+ http://www.facebook.com/externalhit_uatext.php)' http://whatever.com - 这包括 Facebook 爬虫发送的一些标头,某些主机存在问题
看起来您的托管设置无法正确处理其中一个/某些标头 - 我复制了 403 错误:
对于您的 URL,返回:
The command I use to test this issue is
curl -i -H 'Accept: */*' -H 'Range: bytes=0-40960' -H 'Connection: close' -A 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' http://whatever.com
- this includes some of the headers sent by the Facebook crawler that some hosts have problems withLooks like your hosting setup can't handle one/some of those headers properly - I replicated the 403 error:
For your URL, this returned:
脸书和Facebook 调试器发送:
问题可能出在 owasp-modsecurity-crs 规则
#958291
中,该规则给出误报结果:https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/173检查一下通过发送带有标头
Range: bytes=524287
的请求(代替Range: bytes=0-524287
):解决方案
Facebook & Facebook Debugger sends:
The problem may be in the owasp-modsecurity-crs rule
#958291
, which gives false-positive result: https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/173Check it by sending request with header
Range: bytes=524287
(in place ofRange: bytes=0-524287
):Solution