mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add Rack::TempfileReaper to tests and docs
This commit is contained in:
parent
cdffab4bc7
commit
54bb2f74b5
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue