Skip to content

Commit

Permalink
docs: fix Basic Auth example typo
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Mar 28, 2019
1 parent ca95156 commit 306d157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 306d157

Please sign in to comment.