|
|
@ -25,19 +25,19 @@ Rails.application.configure do |
|
|
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? |
|
|
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? |
|
|
|
|
|
|
|
|
|
|
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server. |
|
|
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server. |
|
|
|
# config.asset_host = 'http://assets.example.com' |
|
|
|
# config.asset_host = "http://assets.example.com" |
|
|
|
|
|
|
|
|
|
|
|
# Specifies the header that your server uses for sending files. |
|
|
|
# Specifies the header that your server uses for sending files. |
|
|
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache |
|
|
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache |
|
|
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX |
|
|
|
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX |
|
|
|
|
|
|
|
|
|
|
|
# Store uploaded files on the local file system (see config/storage.yml for options). |
|
|
|
# Store uploaded files on the local file system (see config/storage.yml for options). |
|
|
|
config.active_storage.service = :local |
|
|
|
config.active_storage.service = :local |
|
|
|
|
|
|
|
|
|
|
|
# Mount Action Cable outside main process or domain. |
|
|
|
# Mount Action Cable outside main process or domain. |
|
|
|
# config.action_cable.mount_path = nil |
|
|
|
# config.action_cable.mount_path = nil |
|
|
|
# config.action_cable.url = 'wss://example.com/cable' |
|
|
|
# config.action_cable.url = "wss://example.com/cable" |
|
|
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] |
|
|
|
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] |
|
|
|
|
|
|
|
|
|
|
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
|
|
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
|
|
|
# config.force_ssl = true |
|
|
|
# config.force_ssl = true |
|
|
@ -47,7 +47,7 @@ Rails.application.configure do |
|
|
|
config.log_level = :info |
|
|
|
config.log_level = :info |
|
|
|
|
|
|
|
|
|
|
|
# Prepend all log lines with the following tags. |
|
|
|
# Prepend all log lines with the following tags. |
|
|
|
config.log_tags = [:request_id] |
|
|
|
config.log_tags = [ :request_id ] |
|
|
|
|
|
|
|
|
|
|
|
# Use a different cache store in production. |
|
|
|
# Use a different cache store in production. |
|
|
|
# config.cache_store = :mem_cache_store |
|
|
|
# config.cache_store = :mem_cache_store |
|
|
@ -79,24 +79,18 @@ Rails.application.configure do |
|
|
|
# the I18n.default_locale when a translation cannot be found). |
|
|
|
# the I18n.default_locale when a translation cannot be found). |
|
|
|
config.i18n.fallbacks = true |
|
|
|
config.i18n.fallbacks = true |
|
|
|
|
|
|
|
|
|
|
|
# Send deprecation notices to registered listeners. |
|
|
|
# Don't log any deprecations. |
|
|
|
config.active_support.deprecation = :notify |
|
|
|
config.active_support.report_deprecations = false |
|
|
|
|
|
|
|
|
|
|
|
# Log disallowed deprecations. |
|
|
|
|
|
|
|
config.active_support.disallowed_deprecation = :log |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tell Active Support which deprecation messages to disallow. |
|
|
|
|
|
|
|
config.active_support.disallowed_deprecation_warnings = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Use default logging formatter so that PID and timestamp are not suppressed. |
|
|
|
# Use default logging formatter so that PID and timestamp are not suppressed. |
|
|
|
config.log_formatter = ::Logger::Formatter.new |
|
|
|
config.log_formatter = ::Logger::Formatter.new |
|
|
|
|
|
|
|
|
|
|
|
# Use a different logger for distributed setups. |
|
|
|
# Use a different logger for distributed setups. |
|
|
|
# require "syslog/logger" |
|
|
|
# require "syslog/logger" |
|
|
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') |
|
|
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") |
|
|
|
|
|
|
|
|
|
|
|
if ENV["RAILS_LOG_TO_STDOUT"].present? |
|
|
|
if ENV["RAILS_LOG_TO_STDOUT"].present? |
|
|
|
logger = ActiveSupport::Logger.new($stdout) |
|
|
|
logger = ActiveSupport::Logger.new(STDOUT) |
|
|
|
logger.formatter = config.log_formatter |
|
|
|
logger.formatter = config.log_formatter |
|
|
|
config.logger = ActiveSupport::TaggedLogging.new(logger) |
|
|
|
config.logger = ActiveSupport::TaggedLogging.new(logger) |
|
|
|
end |
|
|
|
end |
|
|
@ -124,4 +118,14 @@ Rails.application.configure do |
|
|
|
# config.active_record.database_selector = { delay: 2.seconds } |
|
|
|
# config.active_record.database_selector = { delay: 2.seconds } |
|
|
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
|
|
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
|
|
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
|
|
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Inserts middleware to perform automatic shard swapping. The `shard_selector` hash |
|
|
|
|
|
|
|
# can be used to pass options to the `ShardSelector` middleware. The `lock` option is |
|
|
|
|
|
|
|
# used to determine whether shard swapping should be prohibited for the request. |
|
|
|
|
|
|
|
# |
|
|
|
|
|
|
|
# The `shard_resolver` option is used by the middleware to determine which shard |
|
|
|
|
|
|
|
# to switch to. The application must provide a mechanism for finding the shard name |
|
|
|
|
|
|
|
# in a proc. See guides for an example. |
|
|
|
|
|
|
|
# config.active_record.shard_selector = { lock: true } |
|
|
|
|
|
|
|
# config.active_record.shard_resolver = ->(request) { Tenant.find_by!(host: request.host).shard } |
|
|
|
end |
|
|
|
end |
|
|
|