How to set Cache-Control and Expires headers for Paperclip uploads.

Posted on May 3, 2015

In Ruby on Rails applications, gem Paperclip is often used with gem Fog, which has a feature of setting up Cache-Control and Expires headers for file uploads.
Assuming, there is the following configuration in config/application.rb file: