mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Add newlines to default responses
This commit is contained in:
parent
f03275efe0
commit
917d47758e
1 changed files with 2 additions and 2 deletions
|
|
@ -37,10 +37,10 @@ module Rack::Attack
|
|||
|
||||
# Set defaults
|
||||
@notifier ||= ActiveSupport::Notifications if defined?(ActiveSupport::Notifications)
|
||||
@blacklisted_response ||= lambda {|env| [503, {}, ['Blocked']] }
|
||||
@blacklisted_response ||= lambda {|env| [503, {}, ["Blocked\n"]] }
|
||||
@throttled_response ||= lambda {|env|
|
||||
retry_after = env['rack.attack.match_data'][:period] rescue nil
|
||||
[503, {'Retry-After' => retry_after.to_s}, ['Retry later']]
|
||||
[503, {'Retry-After' => retry_after.to_s}, ["Retry later\n"]]
|
||||
}
|
||||
|
||||
self
|
||||
|
|
|
|||
Loading…
Reference in a new issue