且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

(#5)未经授权的源IP地址Heroku Rails APP错误

更新时间:2023-12-01 15:53:22

这是因为我的heroku机器的IP地址(与其他应用程序共享)被Facebook列入黑名单。



我的heroku应用程序的一个简单的重新启动解决了这个问题。



我联系了Heroku的支持者,他们告诉我,他们什么都不做,这是很公平的, Facebook是阻止这个IP的连接



他们建议我一个静态IP解决方案,并联系Facebook将其知识产权列入白名单,他们建议我添加一个AddOn。 Proximo 可以让您的应用具有静态IP地址,但我认为它没有非常可扩展(太贵)。 (我还没有尝试过)



所以,我看到这篇文章谈到在亚马逊上使用微型linux EC2实例,代理服务器使静态IP 这里,我认为如果问题仍然存在,我将尝试一下。



修改



在这个 facebook bug report here here ,facebook crew表示,他们会阻止来自任何恶意应用程序的传入连接,如果您的IP共享其中一个,没有什么可以做的。他们还建议一个静态的IP解决方案,如果你想确保这个问题再次发生。


My Heroku app (RoR) started to throw this error when someone tried to sign_in via facebook.

(#5) Unauthorized source IP address

This was happening because the IP address of my heroku machine (shared with another apps) was blacklisted by facebook.

A simple restart of my heroku app solved the issue.

I contacted Heroku support, and they told me they can do nothing about it, and it's fair enough, facebook is the one blocking incoming connections for that IP.

They suggested me an static IP solution, and contact facebook to whitelist my IP, and they suggested me an AddOn for that. Proximo, can make your app have a static IP address, but i think it's no very scalable (too expensive). (I have not tried this yet)

So, i saw this post talking about use a micro linux EC2 instance on Amazon, with a proxy server to make a static IP here, and i think that if the problem persist, i'm going to try it.

Edit

In this facebook bug report here, facebook crew said that they will keep blocking incoming connections from any malicious app, and if your IP is shared with one of them, there's nothing they can do about it. They also suggested a static IP solution, if you want to be sure that this issue is neve going to happen again.