Mercurial > rsstweet
comparison config/environments/production.rb @ 223:ad6264cca788
Update to rails 7
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 15 Jan 2022 02:39:53 +0900 |
parents | 2335107f35d0 |
children | 89f6c0016bab |
comparison
equal
deleted
inserted
replaced
222:fefe9b0a603d | 223:ad6264cca788 |
---|---|
20 # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). | 20 # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). |
21 # config.require_master_key = true | 21 # config.require_master_key = true |
22 | 22 |
23 # Disable serving static files from the `/public` folder by default since | 23 # Disable serving static files from the `/public` folder by default since |
24 # Apache or NGINX already handles this. | 24 # Apache or NGINX already handles this. |
25 config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? | 25 config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? |
26 | 26 |
27 # Enable serving of images, stylesheets, and JavaScripts from an asset server. | 27 # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
28 # config.asset_host = 'http://assets.example.com' | 28 # config.asset_host = "http://assets.example.com" |
29 | 29 |
30 # Specifies the header that your server uses for sending files. | 30 # Specifies the header that your server uses for sending files. |
31 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache | 31 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache |
32 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX | 32 # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX |
33 | 33 |
34 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | 34 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
35 # config.force_ssl = true | 35 # config.force_ssl = true |
36 | 36 |
37 # Include generic and useful information about system operation, but avoid logging too much | 37 # Include generic and useful information about system operation, but avoid logging too much |
50 | 50 |
51 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | 51 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
52 # the I18n.default_locale when a translation cannot be found). | 52 # the I18n.default_locale when a translation cannot be found). |
53 config.i18n.fallbacks = true | 53 config.i18n.fallbacks = true |
54 | 54 |
55 # Send deprecation notices to registered listeners. | 55 # Don't log any deprecations. |
56 config.active_support.deprecation = :notify | 56 config.active_support.report_deprecations = false |
57 | |
58 # Log disallowed deprecations. | |
59 config.active_support.disallowed_deprecation = :log | |
60 | |
61 # Tell Active Support which deprecation messages to disallow. | |
62 config.active_support.disallowed_deprecation_warnings = [] | |
63 | 57 |
64 # Use default logging formatter so that PID and timestamp are not suppressed. | 58 # Use default logging formatter so that PID and timestamp are not suppressed. |
65 config.log_formatter = ::Logger::Formatter.new | 59 config.log_formatter = ::Logger::Formatter.new |
66 | 60 |
67 # Use a different logger for distributed setups. | 61 # Use a different logger for distributed setups. |
68 # require "syslog/logger" | 62 # require "syslog/logger" |
69 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') | 63 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") |
70 | 64 |
71 if ENV["RAILS_LOG_TO_STDOUT"].present? | 65 if ENV["RAILS_LOG_TO_STDOUT"].present? |
72 logger = ActiveSupport::Logger.new(STDOUT) | 66 logger = ActiveSupport::Logger.new(STDOUT) |
73 logger.formatter = config.log_formatter | 67 logger.formatter = config.log_formatter |
74 config.logger = ActiveSupport::TaggedLogging.new(logger) | 68 config.logger = ActiveSupport::TaggedLogging.new(logger) |
75 end | 69 end |
76 | |
77 # Inserts middleware to perform automatic connection switching. | |
78 # The `database_selector` hash is used to pass options to the DatabaseSelector | |
79 # middleware. The `delay` is used to determine how long to wait after a write | |
80 # to send a subsequent read to the primary. | |
81 # | |
82 # The `database_resolver` class is used by the middleware to determine which | |
83 # database is appropriate to use based on the time delay. | |
84 # | |
85 # The `database_resolver_context` class is used by the middleware to set | |
86 # timestamps for the last write to the primary. The resolver uses the context | |
87 # class timestamps to determine how long to wait before reading from the | |
88 # replica. | |
89 # | |
90 # By default Rails will store a last write timestamp in the session. The | |
91 # DatabaseSelector middleware is designed as such you can define your own | |
92 # strategy for connection switching and pass that into the middleware through | |
93 # these configuration options. | |
94 # config.active_record.database_selector = { delay: 2.seconds } | |
95 # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver | |
96 # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session | |
97 end | 70 end |