From c04d02b4256b15725b07ff2617f2c678204f1e7b Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 14 Jun 2012 14:28:42 -0300 Subject: Add docs about how to remove some middleware --- guides/source/rails_on_rack.textile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'guides') diff --git a/guides/source/rails_on_rack.textile b/guides/source/rails_on_rack.textile index 3a7c392508..cf1fbef1f5 100644 --- a/guides/source/rails_on_rack.textile +++ b/guides/source/rails_on_rack.textile @@ -195,6 +195,23 @@ use Rack::Runtime run Blog::Application.routes +You can also remove session related middleware appending the following lines to your application configuration + + +# config/application.rb +config.middleware.delete "ActionDispatch::Cookies" +config.middleware.delete "ActionDispatch::Session::CookieStore" +config.middleware.delete "ActionDispatch::Flash" + + +and you can also remove browser related middleware + + +# config/application.rb +config.middleware.delete "ActionDispatch::BestStandardsSupport" +config.middleware.delete "Rack::MethodOverride" + + h4. Internal Middleware Stack Much of Action Controller's functionality is implemented as Middlewares. The following list explains the purpose of each of them: -- cgit v1.2.3