From debe9a5cbe32dcf31580413ef73b811e8c8e13be Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sat, 17 Feb 2018 15:52:41 -0500 Subject: Multipart file uploads are very rare in API only apps so don't include Rack::TemfileReaper in default middleware stack for API only apps --- railties/lib/rails/application/default_middleware_stack.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails/application') 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 -- cgit v1.2.3