diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-12-01 22:42:26 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-12-01 22:42:26 -0800 |
commit | 2e296c8ee5ddcbd20d7cc80313553148092f77b2 (patch) | |
tree | 667e7b058736b8ca9f45a1dfe6b74ddb594e8670 /railties/lib/rails/application | |
parent | 5b37036b0aa15ef26c65623457d1a2c8408e32d1 (diff) | |
parent | 210d0c7b412760f3efeb0924100479106cfa4817 (diff) | |
download | rails-2e296c8ee5ddcbd20d7cc80313553148092f77b2.tar.gz rails-2e296c8ee5ddcbd20d7cc80313553148092f77b2.tar.bz2 rails-2e296c8ee5ddcbd20d7cc80313553148092f77b2.zip |
Merge pull request #12365 from jbaudanza/reorder
Move Rack::Cache after ActionDispatch::Static in the middleware stack
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/default_middleware_stack.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/application/default_middleware_stack.rb b/railties/lib/rails/application/default_middleware_stack.rb index 570ff02c83..a00afe008c 100644 --- a/railties/lib/rails/application/default_middleware_stack.rb +++ b/railties/lib/rails/application/default_middleware_stack.rb @@ -11,11 +11,6 @@ module Rails def build_stack ActionDispatch::MiddlewareStack.new.tap do |middleware| - if rack_cache = load_rack_cache - require "action_dispatch/http/rack_cache" - middleware.use ::Rack::Cache, rack_cache - end - if config.force_ssl middleware.use ::ActionDispatch::SSL, config.ssl_options end @@ -26,6 +21,11 @@ module Rails middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control end + if rack_cache = load_rack_cache + require "action_dispatch/http/rack_cache" + middleware.use ::Rack::Cache, rack_cache + end + middleware.use ::Rack::Lock unless allow_concurrency? middleware.use ::Rack::Runtime middleware.use ::Rack::MethodOverride |