title: Rails: Serve compressed static assets from Cloudfront
body: <p>I'm using Rails 4 and my app is deployed to Heroku.</p>
  
  <p>I'm trying to serve compressed assets from Cloudfront. Cloudfront's distribution origin points to Amazon S3, where the compressed version of js and css are present.</p>
  
  <p>However, these compressed assets are not being served by Cloudfront. I've read that gems like <code>heroku-deflater</code> and <code>rack-zippy work</code>, but these will serve the assets from Heroku, as opposed to serving them from Cloudfront. In other words, I need my <code>config.serve_static_assets</code> to be <code>false</code>, as I want Heroku not to serve the assets.</p>
  
  <p>How can I serve the compressed assets?</p>