diff --git a/config/environments/production.rb b/config/environments/production.rb index c60fff3e6..fb6c124d8 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -21,6 +21,9 @@ Rails.application.configure do # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ActiveModel::Type::Boolean.new.cast(ENV.fetch('RAILS_SERVE_STATIC_FILES', true)) + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.year.to_i}" + } # Compress JavaScripts and CSS. # config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass