mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +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
|
# Set defaults
|
||||||
@notifier ||= ActiveSupport::Notifications if defined?(ActiveSupport::Notifications)
|
@notifier ||= ActiveSupport::Notifications if defined?(ActiveSupport::Notifications)
|
||||||
@blacklisted_response ||= lambda {|env| [503, {}, ['Blocked']] }
|
@blacklisted_response ||= lambda {|env| [503, {}, ["Blocked\n"]] }
|
||||||
@throttled_response ||= lambda {|env|
|
@throttled_response ||= lambda {|env|
|
||||||
retry_after = env['rack.attack.match_data'][:period] rescue nil
|
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
|
self
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue