| 1 | require "active_support/core_ext/integer/time" |
| 2 | |
| 3 | Rails.application.configure do |
| 4 | # Settings specified here will take precedence over those in config/application.rb. |
| 5 | |
| 6 | # Code is not reloaded between requests. |
| 7 | config.enable_reloading = false |
| 8 | |
| 9 | # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). |
| 10 | config.eager_load = true |
| 11 | |
| 12 | # Full error reports are disabled. |
| 13 | config.consider_all_requests_local = false |
| 14 | |
| 15 | # Turn on fragment caching in view templates. |
| 16 | config.action_controller.perform_caching = true |
| 17 | |
| 18 | # Cache assets for far-future expiry since they are all digest stamped. |
| 19 | config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } |
| 20 | |
| 21 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
| 22 | # config.asset_host = "http://assets.example.com" |
| 23 | |
| 24 | # Store uploaded files on the local file system (see config/storage.yml for options). |
| 25 | config.active_storage.service = :local |
| 26 | |
| 27 | # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
| 28 | # config.assume_ssl = true |
| 29 | |
| 30 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
| 31 | # config.force_ssl = true |
| 32 | |
| 33 | # Skip http-to-https redirect for the default health check endpoint. |
| 34 | # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } |
| 35 | |
| 36 | # Log to STDOUT with the current request id as a default log tag. |
| 37 | config.log_tags = [ :request_id ] |
| 38 | config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) |
| 39 | |
| 40 | # Change to "debug" to log everything (including potentially personally-identifiable information!). |
| 41 | config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") |
| 42 | |
| 43 | # Prevent health checks from clogging up the logs. |
| 44 | config.silence_healthcheck_path = "/up" |
| 45 | |
| 46 | # Don't log any deprecations. |
| 47 | config.active_support.report_deprecations = false |
| 48 | |
| 49 | # Replace the default in-process memory cache store with a durable alternative. |
| 50 | # config.cache_store = :mem_cache_store |
| 51 | |
| 52 | # Replace the default in-process and non-durable queuing backend for Active Job. |
| 53 | # Solid Queue (database-backed) runs the off-web-tier work: GitHub App PR |
| 54 | # reviews, long-running repository imports, and mirror syncs. Recurring tasks |
| 55 | # are declared in config/recurring.yml. |
| 56 | config.active_job.queue_adapter = :solid_queue |
| 57 | config.solid_queue.connects_to = { database: { writing: :queue } } |
| 58 | |
| 59 | # Ignore bad email addresses and do not raise email delivery errors. |
| 60 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
| 61 | # config.action_mailer.raise_delivery_errors = false |
| 62 | |
| 63 | # Set host to be used by links generated in mailer templates. |
| 64 | config.action_mailer.default_url_options = { host: "example.com" } |
| 65 | |
| 66 | # Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit. |
| 67 | # config.action_mailer.smtp_settings = { |
| 68 | # user_name: Rails.application.credentials.dig(:smtp, :user_name), |
| 69 | # password: Rails.application.credentials.dig(:smtp, :password), |
| 70 | # address: "smtp.example.com", |
| 71 | # port: 587, |
| 72 | # authentication: :plain |
| 73 | # } |
| 74 | |
| 75 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
| 76 | # the I18n.default_locale when a translation cannot be found). |
| 77 | config.i18n.fallbacks = true |
| 78 | |
| 79 | # Do not dump schema after migrations. |
| 80 | config.active_record.dump_schema_after_migration = false |
| 81 | |
| 82 | # Only use :id for inspections in production. |
| 83 | config.active_record.attributes_for_inspect = [ :id ] |
| 84 | |
| 85 | # Enable DNS rebinding protection and other `Host` header attacks. |
| 86 | # config.hosts = [ |
| 87 | # "example.com", # Allow requests from example.com |
| 88 | # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
| 89 | # ] |
| 90 | # |
| 91 | # Skip DNS rebinding protection for the default health check endpoint. |
| 92 | # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
| 93 | end |