diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-01-27 18:54:01 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-01-27 18:54:01 -0600 |
commit | 319ae4628f4e0058de3e40e4ca7791b17e45e70c (patch) | |
tree | e5da1bfe6dd69a9cf483c9ff9fd18c5bfdd2f463 /actionpack/lib/action_controller/dispatch/middlewares.rb | |
parent | a0f2b1d95d3785de92ae271fd7ea23e91c0cadc6 (diff) | |
download | rails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.tar.gz rails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.tar.bz2 rails-319ae4628f4e0058de3e40e4ca7791b17e45e70c.zip |
Move HTTP libs and middleware into ActionDispatch component
Diffstat (limited to 'actionpack/lib/action_controller/dispatch/middlewares.rb')
-rw-r--r-- | actionpack/lib/action_controller/dispatch/middlewares.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/dispatch/middlewares.rb b/actionpack/lib/action_controller/dispatch/middlewares.rb new file mode 100644 index 0000000000..3bf3dbebab --- /dev/null +++ b/actionpack/lib/action_controller/dispatch/middlewares.rb @@ -0,0 +1,21 @@ +use "Rack::Lock", :if => lambda { + !ActionController::Base.allow_concurrency +} + +use "ActionDispatch::Failsafe" + +["ActionDispatch::Session::CookieStore", + "ActionDispatch::Session::MemCacheStore", + "ActiveRecord::SessionStore"].each do |store| + use(store, ActionController::Base.session_options, + :if => lambda { + if session_store = ActionController::Base.session_store + session_store.name == store + end + } + ) +end + +use "ActionDispatch::RewindableInput" +use "ActionDispatch::ParamsParser" +use "Rack::MethodOverride" |