# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = Rails.application.secrets.dig(:scaleway, :id).blank? ? :local : :scaleway
# By default, files uploaded to Active Storage will be served from a private URL.
# in production, you'll want to set this to :public so that files are served
# unfortunately, this is not working with the current version of ActiveStorage
# TODO: Update rails version and switch to public:true from active_storage
config.active_storage.service_urls_expire_in = ENV.fetch("SERVICE_URLS_EXPIRE_IN") do
if Rails.application.secrets.dig(:scaleway, :id).blank?
"120000"
else
"1"
end
end.to_i.weeks
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
config.action_cable.mount_path \= nil
https://github.com/OpenSourcePolitics/decidim-ubx/blob/c2b1f0f61691f8cf761a2287c23eb90e80a77339/config/environments/production.rb#L40