diff options
author | Eric Wong <e@80x24.org> | 2015-04-24 02:45:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-04-24 03:00:32 +0000 |
commit | d33d32fe87645e35ad0d0f3438bce9ba8a649da8 (patch) | |
tree | 8c54df8b71495b5c35a240c356d5c6423af3f972 | |
parent | 3bdf5481e49d76b4502c51e5bdd93f68bfd1f0b4 (diff) | |
download | unicorn-d33d32fe87645e35ad0d0f3438bce9ba8a649da8.tar.gz |
rack 1.6 added a TempfileReaper middleware to cleanup temporary files. Enable it by default for users running rack 1.6 or later to avoid leaving temporary files around.
-rw-r--r-- | lib/unicorn.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 638b846..358748f 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -67,6 +67,7 @@ module Unicorn use Rack::CommonLogger, $stderr use Rack::ShowExceptions use Rack::Lint + use Rack::TempfileReaper if Rack.const_defined?(:TempfileReaper) run inner_app end.to_app when "deployment" @@ -74,6 +75,7 @@ module Unicorn use Rack::ContentLength use Rack::Chunked use Rack::CommonLogger, $stderr + use Rack::TempfileReaper if Rack.const_defined?(:TempfileReaper) run inner_app end.to_app else |