Permalink
Browse files

Reverting back to original master

  • Loading branch information...
1 parent 759ab41 commit d25fb5057367c08a67c77093798a3a49cd4e8013 Elad Meidar committed Apr 23, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/rack/contrib/deflect.rb
@@ -67,6 +67,7 @@ def deflect!
end
def deflect? env
+ @env = env
@remote_addr = env['REMOTE_ADDR']
return false if options[:whitelist].include? @remote_addr
return true if options[:blacklist].include? @remote_addr
@@ -85,7 +86,8 @@ def sync &block
def map
@remote_addr_map[@remote_addr] ||= {
:expires => Time.now + options[:interval],
- :requests => 0
+ :requests => 0,
+ :request_uris => []
}
end
@@ -123,6 +125,7 @@ def clear!
def increment_requests
map[:requests] += 1
+ map[:request_uris] << env["REQUEST_URI"]
end
def exceeded_request_threshold?

0 comments on commit d25fb50

Please sign in to comment.