mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
Use single quotes in example configuration
This commit is contained in:
parent
55d5e370fd
commit
5945fbcdf5
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ class Rack::Attack
|
||||||
# throttle logins for another user and force their login requests to be
|
# throttle logins for another user and force their login requests to be
|
||||||
# denied, but that's not very common and shouldn't happen to you. (Knock
|
# denied, but that's not very common and shouldn't happen to you. (Knock
|
||||||
# on wood!)
|
# on wood!)
|
||||||
throttle("logins/email", limit: 5, period: 20.seconds) do |req|
|
throttle('logins/email', limit: 5, period: 20.seconds) do |req|
|
||||||
if req.path == '/login' && req.post?
|
if req.path == '/login' && req.post?
|
||||||
# Normalize the email, using the same logic as your authentication process, to
|
# Normalize the email, using the same logic as your authentication process, to
|
||||||
# protect against rate limit bypasses. Return the normalized email if present, nil otherwise.
|
# protect against rate limit bypasses. Return the normalized email if present, nil otherwise.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue