I currently have an app on Heroku Cedar stack running with Unicorn.
I also have CloudFront configured as a custom origin to host my css/js assets. However it seems like no matter which way I configure the static/assets for Rails it will not allow me to set the Cache-Control, Max-Age or Expires headers.
This is important as the headers are pass-through with CloudFront and if I can't set them CloudFront won't cache them properly.
Try adding this to your environments/production.rb file.
config.static_cache_control = "public, max-age=3600"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With