comparison config/environments/production.rb @ 481:88fd5722fcb3

Update defaults
author nanaya <me@nanaya.pro>
date Sun, 28 Nov 2021 19:45:05 +0900
parents fd3078b4d355
children 6cac8fcf8164
comparison
equal deleted inserted replaced
480:2672acc670d2 481:88fd5722fcb3
1 require "active_support/core_ext/integer/time"
2
1 Rails.application.configure do 3 Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb. 4 # Settings specified here will take precedence over those in config/application.rb.
3 5
4 # Code is not reloaded between requests. 6 # Code is not reloaded between requests.
5 config.cache_classes = true 7 config.cache_classes = true
27 29
28 # Do not fallback to assets pipeline if a precompiled asset is missed. 30 # Do not fallback to assets pipeline if a precompiled asset is missed.
29 config.assets.compile = false 31 config.assets.compile = false
30 32
31 # Enable serving of images, stylesheets, and JavaScripts from an asset server. 33 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
32 # config.action_controller.asset_host = 'http://assets.example.com' 34 # config.asset_host = 'http://assets.example.com'
33 35
34 # Specifies the header that your server uses for sending files. 36 # Specifies the header that your server uses for sending files.
35 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 37 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
36 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 38 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
37 39
38 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 40 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
39 # config.force_ssl = true 41 # config.force_ssl = true
40 42
41 # Use the lowest log level to ensure availability of diagnostic information 43 # Include generic and useful information about system operation, but avoid logging too much
42 # when problems arise. 44 # information to avoid inadvertent exposure of personally identifiable information (PII).
43 config.log_level = :debug 45 config.log_level = :info
44 46
45 # Prepend all log lines with the following tags. 47 # Prepend all log lines with the following tags.
46 config.log_tags = [ :request_id ] 48 config.log_tags = [ :request_id ]
47 49
48 # Use a different cache store in production. 50 # Use a different cache store in production.
57 config.i18n.fallbacks = true 59 config.i18n.fallbacks = true
58 60
59 # Send deprecation notices to registered listeners. 61 # Send deprecation notices to registered listeners.
60 config.active_support.deprecation = :notify 62 config.active_support.deprecation = :notify
61 63
64 # Log disallowed deprecations.
65 config.active_support.disallowed_deprecation = :log
66
67 # Tell Active Support which deprecation messages to disallow.
68 config.active_support.disallowed_deprecation_warnings = []
69
62 # Use default logging formatter so that PID and timestamp are not suppressed. 70 # Use default logging formatter so that PID and timestamp are not suppressed.
63 config.log_formatter = ::Logger::Formatter.new 71 config.log_formatter = ::Logger::Formatter.new
64 72
65 # Use a different logger for distributed setups. 73 # Use a different logger for distributed setups.
66 # require 'syslog/logger' 74 # require "syslog/logger"
67 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 75 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
68 76
69 if $cfg[:log_to_stdout] 77 if $cfg[:log_to_stdout]
70 logger = ActiveSupport::Logger.new(STDOUT) 78 logger = ActiveSupport::Logger.new(STDOUT)
71 logger.formatter = config.log_formatter 79 logger.formatter = config.log_formatter