Skip to content

Commit

Permalink
Gzip Rails responses by default (#495)
Browse files Browse the repository at this point in the history
Gzipping responses trades some server and browser CPU for less data over
the network. This is particularly helpful for browsers on unstable or
slow Internet connections.

Closes #418
  • Loading branch information
eoinkelly authored Oct 5, 2023
1 parent 8e1b013 commit b52b374
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions variants/backend-base/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
config.active_record.encryption.key_derivation_salt = Rails.application.secrets.active_record_encryption_key_derivation_salt
config.action_dispatch.default_headers["X-Frame-Options"] = "DENY"
# gzip Rails responses to help browsers on slow network connections.
config.middleware.use Rack::Deflater
RUBY
end

0 comments on commit b52b374

Please sign in to comment.