Reputation: 8172
I have just enabled Rack::Deflater
in my app. In the headers I can see Accept-Encoding:gzip, deflate, sdch
. But PageSpeed Insights report that the gzip is not enabled! I use Nginx
and Puma
in the server. How can I fix this?
Upvotes: 2
Views: 563
Reputation: 730
I had exactly the similar problem.
When I started the suggestion here to inserting config.middleware.use Rack::Deflater
in config/application.rb
content was not compressed. Solutions suggested like Using config.middleware.insert_before
or updating config.ru
also did not work.
Then I found out that it was not because of any problem with approaches listed above, but it was because, I was using apache/httpd and I had to explicitly enable rack_deflate module as described here, and compression started working.
Upvotes: 2