about summary refs log tree commit diff
path: root/config/environments/production.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2023-03-16 02:55:54 +0100
committerGitHub <noreply@github.com>2023-03-16 02:55:54 +0100
commitf0e727f958cd9428b2c56a3c6a65bbbf176bfa0d (patch)
treee751fd45f4edd451c04d98163439da68bf1cc890 /config/environments/production.rb
parentbe488adf711e75ab05a9b22b6241c676e5615c71 (diff)
Add cache headers to static files served through Rails (#24120)
Diffstat (limited to 'config/environments/production.rb')
-rw-r--r--config/environments/production.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb
index b8536c53a..00d783477 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -19,24 +19,14 @@ Rails.application.configure do
   # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
   # config.require_master_key = true
 
-  # Disable serving static files from the `/public` folder by default since
-  # Apache or NGINX already handles this.
-  config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
-
   ActiveSupport::Logger.new(STDOUT).tap do |logger|
     logger.formatter = config.log_formatter
     config.logger = ActiveSupport::TaggedLogging.new(logger)
   end
 
-  # Compress JavaScripts and CSS.
-  # config.assets.js_compressor = Uglifier.new(mangle: false)
-  # config.assets.css_compressor = :sass
-
   # Do not fallback to assets pipeline if a precompiled asset is missed.
   config.assets.compile = false
 
-  # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
-
   # Specifies the header that your server uses for sending files.
   config.action_dispatch.x_sendfile_header = ENV['SENDFILE_HEADER'] if ENV['SENDFILE_HEADER'].present?
 
@@ -66,7 +56,7 @@ Rails.application.configure do
 
   # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
   # English when a translation cannot be found).
-  config.i18n.fallbacks = [:en]
+  config.i18n.fallbacks = true
 
   # Send deprecation notices to registered listeners.
   config.active_support.deprecation = :notify