instance method
middleware
Ruby on Rails 4.2.9
Since v3.0.20Signature
middleware()
No documentation comment.
Source
# File railties/lib/rails/commands/server.rb, line 87
def middleware
middlewares = []
if RUBY_VERSION < '2.0.0'
middlewares << [Rails::Rack::Debugger] if options[:debugger]
end
middlewares << [::Rack::ContentLength]
# FIXME: add Rack::Lock in the case people are using webrick.
# This is to remain backwards compatible for those who are
# running webrick in production. We should consider removing this
# in development.
if server.name == 'Rack::Handler::WEBrick'
middlewares << [::Rack::Lock]
end
Hash.new(middlewares)
end
Defined in railties/lib/rails/commands/server.rb line 87
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Server