2025-01-16 19:40:29 -05:00
|
|
|
require "active_support/core_ext/integer/time"
|
|
|
|
|
2022-11-20 15:06:27 -05:00
|
|
|
Rails.application.configure do
|
|
|
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
|
|
|
|
|
|
# Code is not reloaded between requests.
|
2023-10-10 23:01:12 -04:00
|
|
|
config.enable_reloading = false
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
|
2022-11-20 15:06:27 -05:00
|
|
|
config.eager_load = true
|
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Full error reports are disabled.
|
2023-03-08 19:25:24 -05:00
|
|
|
config.consider_all_requests_local = false
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Turn on fragment caching in view templates.
|
|
|
|
config.action_controller.perform_caching = true
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Cache assets for far-future expiry since they are all digest stamped.
|
|
|
|
config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
|
2022-11-20 15:06:27 -05:00
|
|
|
|
|
|
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
|
|
# config.asset_host = "http://assets.example.com"
|
|
|
|
|
|
|
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
|
|
|
config.active_storage.service = :local
|
|
|
|
|
2023-10-10 23:01:12 -04:00
|
|
|
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
|
|
|
# config.assume_ssl = true
|
|
|
|
|
2022-11-20 15:06:27 -05:00
|
|
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
2023-10-31 21:28:48 -04:00
|
|
|
config.force_ssl = false
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2024-06-21 23:35:36 -04:00
|
|
|
# Skip http-to-https redirect for the default health check endpoint.
|
|
|
|
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Log to STDOUT with the current request id as a default log tag.
|
2024-06-21 23:35:36 -04:00
|
|
|
config.log_tags = [ :request_id ]
|
2025-01-16 19:40:29 -05:00
|
|
|
config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Change to "debug" to log everything (including potentially personally-identifiable information!).
|
2023-10-10 23:01:12 -04:00
|
|
|
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Prevent health checks from clogging up the logs.
|
|
|
|
config.silence_healthcheck_path = "/up"
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Don't log any deprecations.
|
|
|
|
config.active_support.report_deprecations = false
|
2024-09-08 21:13:59 -04:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Replace the default in-process memory cache store with a durable alternative.
|
|
|
|
# config.cache_store = :mem_cache_store
|
2022-11-20 15:06:27 -05:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Replace the default in-process and non-durable queuing backend for Active Job.
|
|
|
|
config.cache_store = :solid_cache_store
|
2022-11-20 15:06:27 -05:00
|
|
|
|
|
|
|
# Ignore bad email addresses and do not raise email delivery errors.
|
|
|
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
|
|
# config.action_mailer.raise_delivery_errors = false
|
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Set host to be used by links generated in mailer templates.
|
|
|
|
config.action_mailer.default_url_options = { host: "example.com" }
|
|
|
|
|
|
|
|
# Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
|
|
|
|
# config.action_mailer.smtp_settings = {
|
|
|
|
# user_name: Rails.application.credentials.dig(:smtp, :user_name),
|
|
|
|
# password: Rails.application.credentials.dig(:smtp, :password),
|
|
|
|
# address: "smtp.example.com",
|
|
|
|
# port: 587,
|
|
|
|
# authentication: :plain
|
|
|
|
# }
|
|
|
|
|
2022-11-20 15:06:27 -05:00
|
|
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
|
|
# the I18n.default_locale when a translation cannot be found).
|
|
|
|
config.i18n.fallbacks = true
|
|
|
|
|
|
|
|
# Do not dump schema after migrations.
|
|
|
|
config.active_record.dump_schema_after_migration = false
|
2023-10-10 23:01:12 -04:00
|
|
|
|
2025-01-16 19:40:29 -05:00
|
|
|
# Only use :id for inspections in production.
|
|
|
|
config.active_record.attributes_for_inspect = [ :id ]
|
|
|
|
|
2023-10-10 23:01:12 -04:00
|
|
|
# Enable DNS rebinding protection and other `Host` header attacks.
|
|
|
|
# config.hosts = [
|
|
|
|
# "example.com", # Allow requests from example.com
|
|
|
|
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
|
|
|
# ]
|
2025-01-16 19:40:29 -05:00
|
|
|
#
|
2023-10-10 23:01:12 -04:00
|
|
|
# Skip DNS rebinding protection for the default health check endpoint.
|
|
|
|
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
2025-01-16 19:40:29 -05:00
|
|
|
|
|
|
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
|
|
|
config.active_job.queue_adapter = :solid_queue
|
|
|
|
config.solid_queue.connects_to = { database: { writing: :queue } }
|
|
|
|
|
|
|
|
# config.active_job.queue_name_prefix = "family_budget_production"
|
2022-11-20 15:06:27 -05:00
|
|
|
end
|