Closed alexsmartens closed 5 months ago
Everything works:
Rack::Attack.clear_configuration
Rack::Attack.blocklist('blocklist from localhost') do |req|
'127.0.0.1' == req.ip || '::1' == req.ip
end
My mistake was trying to add a rule in console. 🤦♂️ When modifying Rack::Attack
rules in the console, these changes are not reflected in the running server because the console and server operate as separate processes with their own environments.
Somewhat related to https://github.com/rack/rack-attack/issues/241.
A dynamically added rule is being ignored, steps to reproduce:
->
the request goes through (the rule added above is ignored).Additional info from the console: