From 306d157df340aeea1229af08c79ad57a8c847481 Mon Sep 17 00:00:00 2001 From: Gonzalo Rodriguez Date: Thu, 28 Mar 2019 12:08:48 -0300 Subject: [PATCH] docs: fix Basic Auth example typo --- docs/advanced_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced_configuration.md b/docs/advanced_configuration.md index c17590ab..a20a2f2f 100644 --- a/docs/advanced_configuration.md +++ b/docs/advanced_configuration.md @@ -85,7 +85,7 @@ An example implementation for blocking hackers who spam basic auth attempts. See # block all requests from that IP for 1 hour. Rack::Attack.blocklist('basic auth crackers') do |req| Rack::Attack::Allow2Ban.filter(req.ip, :maxretry => 5, :findtime => 1.minute, :bantime => 1.hour) do - # Return true if the authorization header not incorrect + # Return true if the authorization header is incorrect auth = Rack::Auth::Basic::Request.new(req.env) auth.credentials != [my_username, my_password] end