ActionDispatch::Static
serves static files under "public" directory
Rack::Lock
locks the rest of the application to a single thread
ActiveSupport::Cache::Strategy::LocalCache::Middleware
flushes memory based store used internally by Rails.cache
Rack::Runtime
adds X-Runtime
to response header providing number of seconds to process rest of the app
Rack::MethodOverride
sets the HTTP request method based on _method
parameter
ActionDispatch::RequestId
assigns a unique id to the request and adds X-Request-Id
response header
Rails::Rack::Logger
logs beginning of request and flushes log after request
ActionDispatch::ShowExceptions
and ActionDispatch::DebugExceptions
catch exceptions and display them on a pretty page
ActionDispatch::RemoteIp
captures the remote IP address for later use
ActionDispatch::Reloader
reloads classes in development
ActionDispatch::Callbacks
provides before/after callback hook
ActiveRecord::ConnectionAdapters::ConnectionManagement
clears active database connections
ActiveRecord::QueryCache
clears query cache at the end of each request
ActionDispatch::Cookies
converts cookies to Set-Cookie
HTTP response header.
ActionDispatch::Session::CookieStore
converts session into a cookie
ActionDispatch::Flash
stores flash in session and sweeps as necessary
ActionDispatch::ParamsParser
parses different formatted requests (XML/JSON) into params hash
ActionDispatch::Head
strips out response body on HEAD requests
Rack::ConditionalGet
and Rack::ETag
strips out response body when it has not been modified
ActionDispatch::BestStandardsSupport
tells Internet Explorer to use Chrome Frame or latest rendering engine
In the production environment the middleware stack is slightly different. Gone are ActionDispatch::Static
and ActionDispatch::Reloader
. Added is Rack::Cache which manages HTTP caching.