|
17 | 17 | # Turn on fragment caching in view templates.
|
18 | 18 | config.action_controller.perform_caching = true
|
19 | 19 |
|
| 20 | + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] |
| 21 | + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). |
| 22 | + # config.require_master_key = true |
| 23 | + |
| 24 | + # Disable serving static files from the `/public` folder by default since |
| 25 | + # Apache or NGINX already handles this. |
| 26 | + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? |
| 27 | + |
20 | 28 | # Cache assets for far-future expiry since they are all digest stamped.
|
21 | 29 | config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
|
22 | 30 |
|
|
45 | 53 | # Prevent health checks from clogging up the logs.
|
46 | 54 | config.silence_healthcheck_path = "/up"
|
47 | 55 |
|
48 |
| - # Don't log any deprecations. |
49 |
| - config.active_support.report_deprecations = false |
50 |
| - |
51 | 56 | # Replace the default in-process memory cache store with a durable alternative.
|
52 | 57 | # config.cache_store = :mem_cache_store
|
53 | 58 |
|
|
59 | 64 | # config.action_mailer.raise_delivery_errors = false
|
60 | 65 |
|
61 | 66 | # Set host to be used by links generated in mailer templates.
|
62 |
| - config.action_mailer.default_url_options = { host: "example.com" } |
| 67 | + # config.action_mailer.default_url_options = { host: "example.com" } |
63 | 68 |
|
64 | 69 | # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
|
65 | 70 | # config.action_mailer.smtp_settings = {
|
|
74 | 79 | # the I18n.default_locale when a translation cannot be found).
|
75 | 80 | config.i18n.fallbacks = true
|
76 | 81 |
|
| 82 | + # Don't log any deprecations. |
| 83 | + # config.active_support.report_deprecations = false |
| 84 | + |
| 85 | + # Send deprecation notices to registered listeners. |
| 86 | + config.active_support.deprecation = :notify |
| 87 | + |
| 88 | + # Log disallowed deprecations. |
| 89 | + config.active_support.disallowed_deprecation = :log |
| 90 | + |
| 91 | + # Tell Active Support which deprecation messages to disallow. |
| 92 | + config.active_support.disallowed_deprecation_warnings = [] |
| 93 | + |
| 94 | + # Use default logging formatter so that PID and timestamp are not suppressed. |
| 95 | + config.log_formatter = Logger::Formatter.new |
| 96 | + |
| 97 | + # Use a different logger for distributed setups. |
| 98 | + # require "syslog/logger" |
| 99 | + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') |
| 100 | + |
| 101 | + if ENV["RAILS_LOG_TO_STDOUT"].present? |
| 102 | + logger = ActiveSupport::Logger.new($stdout) |
| 103 | + logger.formatter = config.log_formatter |
| 104 | + config.logger = ActiveSupport::TaggedLogging.new(logger) |
| 105 | + end |
| 106 | + |
77 | 107 | # Do not dump schema after migrations.
|
78 | 108 | config.active_record.dump_schema_after_migration = false
|
79 | 109 |
|
80 | 110 | # Only use :id for inspections in production.
|
81 |
| - config.active_record.attributes_for_inspect = [:id] |
| 111 | + # config.active_record.attributes_for_inspect = [:id] |
82 | 112 |
|
83 | 113 | # Enable DNS rebinding protection and other `Host` header attacks.
|
84 | 114 | # config.hosts = [
|
|
88 | 118 | #
|
89 | 119 | # Skip DNS rebinding protection for the default health check endpoint.
|
90 | 120 | # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
| 121 | + |
| 122 | + # strategy for connection switching and pass that into the middleware through |
| 123 | + # these configuration options. |
| 124 | + # config.active_record.database_selector = { delay: 2.seconds } |
| 125 | + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
| 126 | + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
| 127 | + |
| 128 | + # Action Cable endpoint configuration |
| 129 | + |
| 130 | + config.action_cable.url = "wss://#{ENV.fetch('PRODUCTION_HOST', nil)}/cable" |
| 131 | + config.action_cable.allowed_request_origins = ["https://#{ENV.fetch('PRODUCTION_HOST', nil)}"] |
91 | 132 | end
|
0 commit comments