|
| 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 | + # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
| 25 | + config.assume_ssl = true |
| 26 | + |
| 27 | + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
| 28 | + config.force_ssl = true |
| 29 | + |
| 30 | + # Skip http-to-https redirect for the default health check endpoint. |
| 31 | + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } |
| 32 | + |
| 33 | + # Log to STDOUT with the current request id as a default log tag. |
| 34 | + config.log_tags = [ :request_id ] |
| 35 | + # config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) |
| 36 | + |
| 37 | + # Change to "debug" to log everything (including potentially personally-identifiable information!) |
| 38 | + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") |
| 39 | + |
| 40 | + # Prevent health checks from clogging up the logs. |
| 41 | + config.silence_healthcheck_path = "/up" |
| 42 | + |
| 43 | + # Don't log any deprecations. |
| 44 | + config.active_support.report_deprecations = false |
| 45 | + |
| 46 | + # Replace the default in-process memory cache store with a durable alternative. |
| 47 | + # config.cache_store = :mem_cache_store |
| 48 | + |
| 49 | + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
| 50 | + # the I18n.default_locale when a translation cannot be found). |
| 51 | + config.i18n.fallbacks = true |
| 52 | + |
| 53 | + # Enable DNS rebinding protection and other `Host` header attacks. |
| 54 | + # config.hosts = [ |
| 55 | + # "example.com", # Allow requests from example.com |
| 56 | + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
| 57 | + # ] |
| 58 | + # |
| 59 | + # Skip DNS rebinding protection for the default health check endpoint. |
| 60 | + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
| 61 | +end |
0 commit comments