Home

Awesome

heroku-deflater

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.

Installing

Add to your Gemfile:

gem 'heroku-deflater', :group => :production

Contributing to heroku-deflater

Copyright

Copyright (c) 2012 Roman Shterenzon. See LICENSE.txt for further details.