Enable gzip compression on heroku, but don't compress images.
Enable gzip compression on heroku, but don't compress images.
A simple rack middleware that enables compressing of your sprockets and webpacker assets and application responses on Heroku, while not wasting CPU cycles on pointlessly compressing images and other binary responses.
It also includes code from https://github.com/mattolson/heroku_rails_deflate
Before serving a file from disk to a gzip-enabled client, it will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.
Add to your Gemfile:
gem 'heroku-deflater', :group => :productionCopyright (c) 2012 Roman Shterenzon. See LICENSE.txt for further details.
No open issues yet, or sync has not completed.