rack-attack是用于阻止和限制恶意滥用Web请求的Rack中间件,可以保护您的Rails和Rack应用程序免受恶意客户的侵害。Rack :: Attack可让您根据请求的属性轻松决定何时允许,阻止和限制。 请参阅介绍Rack :: Attack的Backing&Hacking博客文章。https://www.kickstarter.com/backing-and-hacking/rack-attack-protection-from-abusive-clients 或访问https://github.com/kickstarter/rack-attack Getting started Installing Add this line to your application’s Gemfile: # In your Gemfile gem ‘rack-attack’ And then execute: $ bundle Or install it yourself as: $ gem install rack-attack Plugging into the application Then tell your ruby web application to use rack-attack… Continue Reading Ruby Gem – kickstarter/rack-attack: Rack middleware for blocking & throttling