Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streaming was not working either in development (disable_streaming off) nor on production Heroku. Adding a Last-Modified header made it work. The problem would only manifest when using rack 2.2 or higher, and was caused by rack/rack#1416, where the `Rack::ETag` middleware changed it's behaviour to buffer the response and calculate an ETag digest even though the `Cache-Control: no-cache` header is set. This breaks the CSV streaming responses so to avoid that we use the hack outlined in rack/rack#1619 and set a Last-Modified header which triggers the `skip_caching?` condition in the `Rack::ETag` middleware. See activeadmin#6451 and alphagov/e-petitions@46413a7
- Loading branch information