|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +require 'active_support/core_ext/integer/time' |
| 4 | + |
| 5 | +Rails.application.configure do |
| 6 | + # Settings specified here will take precedence over those in config/application.rb. |
| 7 | + |
| 8 | + # Code is not reloaded between requests. |
| 9 | + config.enable_reloading = false |
| 10 | + |
| 11 | + # Eager load code on boot. This eager loads most of Rails and |
| 12 | + # your application in memory, allowing both threaded web servers |
| 13 | + # and those relying on copy on write to perform better. |
| 14 | + # Rake tasks automatically ignore this option for performance. |
| 15 | + config.eager_load = true |
| 16 | + |
| 17 | + # Full error reports are disabled and caching is turned on. |
| 18 | + config.consider_all_requests_local = false |
| 19 | + config.action_controller.perform_caching = true |
| 20 | + |
| 21 | + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment |
| 22 | + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). |
| 23 | + # config.require_master_key = true |
| 24 | + |
| 25 | + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. |
| 26 | + # config.public_file_server.enabled = false |
| 27 | + |
| 28 | + # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
| 29 | + # config.asset_host = "http://assets.example.com" |
| 30 | + |
| 31 | + # Specifies the header that your server uses for sending files. |
| 32 | + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache |
| 33 | + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX |
| 34 | + |
| 35 | + # Mount Action Cable outside main process or domain. |
| 36 | + # config.action_cable.mount_path = nil |
| 37 | + # config.action_cable.url = "wss://example.com/cable" |
| 38 | + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] |
| 39 | + |
| 40 | + # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
| 41 | + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. |
| 42 | + # config.assume_ssl = true |
| 43 | + |
| 44 | + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
| 45 | + config.force_ssl = ENV['RAILS_DISABLE_SSL'].blank? |
| 46 | + |
| 47 | + # Skip http-to-https redirect for the default health check endpoint. |
| 48 | + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } |
| 49 | + |
| 50 | + # Log to STDOUT by default |
| 51 | + config.logger = ActiveSupport::Logger.new($stdout) |
| 52 | + .tap { |logger| logger.formatter = Logger::Formatter.new } |
| 53 | + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } |
| 54 | + |
| 55 | + # Prepend all log lines with the following tags. |
| 56 | + config.log_tags = [:request_id] |
| 57 | + |
| 58 | + # "info" includes generic and useful information about system operation, but avoids logging too much |
| 59 | + # information to avoid inadvertent exposure of personally identifiable information (PII). If you |
| 60 | + # want to log everything, set the level to "debug". |
| 61 | + config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') |
| 62 | + |
| 63 | + # Use a different cache store in production. |
| 64 | + # config.cache_store = :mem_cache_store |
| 65 | + |
| 66 | + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
| 67 | + # the I18n.default_locale when a translation cannot be found). |
| 68 | + config.i18n.fallbacks = true |
| 69 | + |
| 70 | + # Don't log any deprecations. |
| 71 | + config.active_support.report_deprecations = false |
| 72 | + |
| 73 | + # Do not dump schema after migrations. |
| 74 | + config.active_record.dump_schema_after_migration = false |
| 75 | + |
| 76 | + # Store files locally. |
| 77 | + config.active_storage.service = :amazon |
| 78 | + |
| 79 | + # Enable DNS rebinding protection and other `Host` header attacks. |
| 80 | + # config.hosts = [ |
| 81 | + # "example.com", # Allow requests from example.com |
| 82 | + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
| 83 | + # ] |
| 84 | + # Skip DNS rebinding protection for the default health check endpoint. |
| 85 | + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
| 86 | +end |
0 commit comments