Throttling Rails logins with Rack Attack | Greg Molnar

This week, I will show you how to rate-limit your authentication endpoints with Rack::Attack.Rack::Attack is a middleware for blocking or throttling requests based on rules. It uses the configured cache store of Rails to store the necessary data, but a separate data store can be configured too.In the examples, I will use Devise’s endpoints, but the same setup works with any authentication system, you just need to change the URLs.Setting up Rack::Attack is very simple, you need to add the gem to your project with bundle add rack-attack.
Throttling Rails logins with Rack Attack | Greg Molnar #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/throttling-rails-logins-with-rack-attack-greg-molnar

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles