Use single quotes in example configuration

This commit is contained in:
brchristian 2021-01-16 10:19:33 -08:00 committed by Gonzalo
parent d1b01f0b4a
commit 0f1a72a4d4
No known key found for this signature in database
GPG key ID: 319EB6E3DB0D60FA

View file

@ -59,7 +59,7 @@ class Rack::Attack
# 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
# 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?
# 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.