diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2018-02-17 15:52:41 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2018-02-17 15:52:41 -0500 |
commit | debe9a5cbe32dcf31580413ef73b811e8c8e13be (patch) | |
tree | 80ec871faf0e665053b88e4a7f70f949d255bc57 /railties/lib/rails/application | |
parent | 1e526788e6b1d3f42f4d8fdca20e588d42838c80 (diff) | |
download | rails-debe9a5cbe32dcf31580413ef73b811e8c8e13be.tar.gz rails-debe9a5cbe32dcf31580413ef73b811e8c8e13be.tar.bz2 rails-debe9a5cbe32dcf31580413ef73b811e8c8e13be.zip |
Multipart file uploads are very rare in API only apps so don't include Rack::TemfileReaper in default middleware stack for API only apps
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/default_middleware_stack.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/application/default_middleware_stack.rb b/railties/lib/rails/application/default_middleware_stack.rb index 73c7defe7f..433a7ab41f 100644 --- a/railties/lib/rails/application/default_middleware_stack.rb +++ b/railties/lib/rails/application/default_middleware_stack.rb @@ -70,7 +70,8 @@ module Rails middleware.use ::Rack::Head middleware.use ::Rack::ConditionalGet middleware.use ::Rack::ETag, "no-cache" - middleware.use ::Rack::TempfileReaper + + middleware.use ::Rack::TempfileReaper unless config.api_only end end |