default to drop_session protection (should play nice with APIs and login pages)

This commit is contained in:
Konstantin Haase 2012-05-29 15:01:13 +02:00
parent f948c236fe
commit 03465b14f6
1 changed files with 1 additions and 0 deletions

View File

@ -1474,6 +1474,7 @@ module Sinatra
options = Hash === protection ? protection.dup : {}
options[:except] = Array options[:except]
options[:except] += [:session_hijacking, :remote_token] unless sessions?
options[:reaction] ||= :drop_session
builder.use Rack::Protection, options
end