Skip to content

Commit

Permalink
Unbreak image assets due to heroic-deflater bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackeus committed Jul 16, 2021
1 parent 484cf58 commit 1becb72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,3 @@ group :test do
gem "factory_girl_rails"
gem "webmock"
end

group :production do
gem "heroku-deflater"
end
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ GEM
rspec (>= 2.99.0, < 4.0)
hashdiff (1.0.1)
hashie (4.1.0)
heroku-deflater (0.6.3)
rack (>= 1.4.5)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
intercom-rails (0.4.2)
Expand Down Expand Up @@ -320,7 +318,6 @@ DEPENDENCIES
guard
guard-pow
guard-rspec
heroku-deflater
intercom-rails
jbuilder
listen
Expand Down
6 changes: 4 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ class Application < Rails::Application
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")

# Use Rack::Deflator for gzipped assets in dev env (in production we use heroku-deflater)
config.middleware.use Rack::Deflater if Rails.env.development?
# https://github.com/romanbsd/heroku-deflater/issues/54#issuecomment-803400481
config.middleware.use Rack::Deflater,
include: Rack::Mime::MIME_TYPES.values.grep(/text|json|javascript/).uniq,
if: lambda { |env, status, headers, body| body.body.length > 512 }

config.hosts.clear

Expand Down

0 comments on commit 1becb72

Please sign in to comment.