mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add Rack::Lock for webrick
This commit is contained in:
parent
5d416b9078
commit
da3d28ea33
1 changed files with 9 additions and 0 deletions
|
@ -87,6 +87,15 @@ module Rails
|
|||
middlewares = []
|
||||
middlewares << [Rails::Rack::Debugger] if options[:debugger]
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue