Skip to content

Commit

Permalink
Port rack/protection#46 temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
skade committed Mar 13, 2013
1 parent 8bc2168 commit 7c207aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -19,7 +19,6 @@ group :development do
puts "=> Using sinatra edge"
gem "sinatra", :git => "git://github.com/sinatra/sinatra.git" # :path => "/Developer/src/Extras/sinatra"
end
gem "rack-protection", :git => "git://github.com/rkh/rack-protection.git"
gem "json", ">= 1.5.3"
gem "nokogiri", ">= 1.4.4"
gem "rack", ">= 1.3.0"
Expand Down
1 change: 1 addition & 0 deletions padrino-core/lib/padrino-core.rb
Expand Up @@ -13,6 +13,7 @@
require 'padrino-core/server'
require 'padrino-core/tasks'
require 'padrino-core/module'
require 'padrino-core/ext/rack-protection'


# The Padrino environment (falls back to the rack env or finally develop)
Expand Down
11 changes: 11 additions & 0 deletions padrino-core/lib/padrino-core/ext/rack-protection.rb
@@ -0,0 +1,11 @@
module Rack
module Protection
class Base
DEFAULT_OPTIONS[:report_key] = "protection.failed"

def report(env)
env[options[:report_key]] = true
end
end
end
end

0 comments on commit 7c207aa

Please sign in to comment.