在Heroku上阻止IP [英] Block IPs on heroku

查看:129
本文介绍了在Heroku上阻止IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在heroku的文档或Google的任何地方都找不到.通常,这是在主机文件中完成的.有谁知道如何在heroku上阻止ip?

I haven't found this any where in heroku's documentation or on google. Typically this is done in the host file. Does anyone have any idea how to block an ip on heroku?

推荐答案

Heroku没有可用于阻止IP的防火墙,因此您将不得不在应用程序级别将其阻止,或者必须在您的应用程序前面放置某种代理,可以用来阻止IP.人们最常用的一种方法是 CloudFlare ,它支持阻止单个IP,限速IP等.

Heroku doesn't have a firewall that you can use to block IPs, so you would have to either block it at the application level, or you would have to put a proxy of some sort in front of your application that you can use to block the IP. One common one people use is CloudFlare, which has support for blocking individual IPs, rate limiting IPs, etc.

如果您想在应用程序级别坚持使用阻塞,并且正在使用Ruby on Rails,则此问题和答案可能会为您提供所需的信息:

If you want to stick with blocking at the application level, and are using Ruby on Rails, this question and answer which might give you what you're looking for: How can you block or filter IP addresses on Heroku?

这篇关于在Heroku上阻止IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆