File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def new(app)
4040
4141 # Set defaults
4242 @notifier ||= ActiveSupport ::Notifications if defined? ( ActiveSupport ::Notifications )
43- @blacklisted_response ||= lambda { |env | [ 403 , { } , [ "Unauthorized \n " ] ] }
43+ @blacklisted_response ||= lambda { |env | [ 403 , { } , [ "Forbidden \n " ] ] }
4444 @throttled_response ||= lambda { |env |
4545 retry_after = env [ 'rack.attack.match_data' ] [ :period ] rescue nil
4646 [ 429 , { 'Retry-After' => retry_after . to_s } , [ "Retry later\n " ] ]
Original file line number Diff line number Diff line change 1616 it "should return a blacklist response" do
1717 get '/' , { } , 'REMOTE_ADDR' => @bad_ip
1818 last_response . status . must_equal 403
19+ last_response . body . must_equal "Forbidden\n "
1920 end
2021 it "should tag the env" do
2122 last_request . env [ 'rack.attack.matched' ] . must_equal "ip #{ @bad_ip } "
You can’t perform that action at this time.
0 commit comments