Add Rack::TempfileReaper to tests and docs

This commit is contained in:
George Claghorn 2018-01-30 18:21:07 -05:00
parent cdffab4bc7
commit 54bb2f74b5
2 changed files with 9 additions and 2 deletions

View File

@ -126,6 +126,7 @@ use ActionDispatch::ContentSecurityPolicy::Middleware
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
use Rack::TempfileReaper
run MyApp::Application.routes
```
@ -300,6 +301,10 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol
* Adds ETag header on all String bodies. ETags are used to validate cache.
**`Rack::TempfileReaper`**
* Cleans up tempfiles used to buffer multipart requests.
TIP: It's possible to use any of the above middlewares in your custom Rack stack.
Resources

View File

@ -45,7 +45,8 @@ module ApplicationTests
"ActionDispatch::ContentSecurityPolicy::Middleware",
"Rack::Head",
"Rack::ConditionalGet",
"Rack::ETag"
"Rack::ETag",
"Rack::TempfileReaper"
], middleware
end
@ -69,7 +70,8 @@ module ApplicationTests
"ActionDispatch::Callbacks",
"Rack::Head",
"Rack::ConditionalGet",
"Rack::ETag"
"Rack::ETag",
"Rack::TempfileReaper"
], middleware
end