heroku-deflater icon indicating copy to clipboard operation
heroku-deflater copied to clipboard

Enable gzip compression on heroku, but don't compress images.

Results 8 heroku-deflater issues
Sort by recently updated
recently updated
newest added

Using rails 00c2d3e1e61093451a00b1b70548cfd9ae549c53 as of this writing. ``` 2020-06-13T18:37:54+00:00: Rack app error handling request { GET /assets/admin-c9569c117d1107474494012b3a255f49a3570eedd08e51123008d0412abc93cb.js } #

When I add this gem and deploy to Heroku I get the error: ``` rake aborted! NoMethodError: undefined method `assets' for # ``` I assume this is because Asset Pipeline/sprockets...

From what I could glean, heroku-deflater checks the `static-cache_control` config. However, it looks like in Rails 5.1, setting `public_file_server.headers` is preferred.

As of rack 2.1.1 I always get this kind of error: ``` 2020-01-27T17:55:25.393308+00:00 app[web.1]: I, [2020-01-27T17:55:25.393231 #3] INFO -- : [64d627de-3d78-4643-9fe3-6a8f911cbc5a] Completed 302 Found in 43ms (ActiveRecord: 19.5ms | Allocations:...

The [current Rails streaming implementation](https://github.com/rails/rails/blob/v5.1.3/actionpack/lib/action_controller/metal/streaming.rb) works by rendering directly to a chunked body. This means it is chunked, and then gzipped by the Rack::Deflater middleware that we use. I can...

Deploying to heroku in prod can me this error `No such middleware to insert before: ActionDispatch::Static` so removed this gem and the deploy was successful. ``` ruby '2.4.0' gem 'rails',...

Since, I believe, rack 1.6, `Rack::Deflater` has the ability to not compress images. Here's the PR: https://github.com/rack/rack/pull/457 So: ```ruby module YourApp class Application < Rails::Application config.middleware.use Rack::Deflater, include: Rack::Mime::MIME_TYPES.select{|k,v| v...

Thanks for a great project! the readme says: > Before serving a file from disk to a gzip-enabled client, it will look for a precompressed file in the same location...