From 8a07782e0f52fc42885d999cea89248bae333ca2 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 7 Nov 2025 13:13:24 +0100 Subject: [PATCH] Enable public file server for assets Attempt to deal with https://app.fizzy.do/5986089/cards/2790 --- config/environments/production.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 62a5b4cb0..8ca445d76 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -20,8 +20,10 @@ Rails.application.configure do # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. - # config.public_file_server.enabled = false + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.year.to_i}" + } # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.asset_host = "http://assets.example.com"