|
4 | 4 | # Settings specified here will take precedence over those in config/application.rb.
|
5 | 5 |
|
6 | 6 | # Code is not reloaded between requests.
|
7 |
| - config.enable_reloading = false |
| 7 | + config.cache_classes = true |
8 | 8 |
|
9 | 9 | # Eager load code on boot. This eager loads most of Rails and
|
10 | 10 | # your application in memory, allowing both threaded web servers
|
|
16 | 16 | config.consider_all_requests_local = false
|
17 | 17 | config.action_controller.perform_caching = true
|
18 | 18 |
|
19 |
| - # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment |
20 |
| - # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). |
| 19 | + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] |
| 20 | + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). |
21 | 21 | # config.require_master_key = true
|
22 | 22 |
|
23 |
| - # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it). |
| 23 | + # Disable serving static files from the `/public` folder by default since |
| 24 | + # Apache or NGINX already handles this. |
24 | 25 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
25 | 26 |
|
| 27 | + # Compress JavaScripts and CSS. |
| 28 | + # config.assets.js_compressor = :uglifier |
| 29 | + # Compress CSS using a preprocessor. |
| 30 | + # config.assets.css_compressor = :sass |
| 31 | + |
| 32 | + # Do not fallback to assets pipeline if a precompiled asset is missed. |
| 33 | + # config.assets.compile = false |
| 34 | + |
26 | 35 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
27 | 36 | # config.asset_host = "http://assets.example.com"
|
28 | 37 |
|
29 | 38 | # Specifies the header that your server uses for sending files.
|
30 | 39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
31 | 40 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
32 | 41 |
|
33 |
| - # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
34 |
| - # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. |
35 |
| - # config.assume_ssl = true |
36 |
| - |
37 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
38 | 43 | # config.force_ssl = true
|
39 | 44 |
|
| 45 | + # Include generic and useful information about system operation, but avoid logging too much |
| 46 | + # information to avoid inadvertent exposure of personally identifiable information (PII). |
| 47 | + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", :info) |
| 48 | + |
40 | 49 | # Prepend all log lines with the following tags.
|
41 | 50 | config.log_tags = [:request_id]
|
42 | 51 |
|
43 |
| - # Info include generic and useful information about system operation, but avoids logging too much |
44 |
| - # information to avoid inadvertent exposure of personally identifiable information (PII). If you |
45 |
| - # want to log everything, set the level to "debug". |
46 |
| - config.log_level = ENV.fetch("RAILS_LOG_LEVEL", :info) |
47 |
| - |
48 | 52 | # Use a different cache store in production.
|
49 | 53 | # config.cache_store = :mem_cache_store
|
50 | 54 |
|
|
62 | 66 | # the I18n.default_locale when a translation cannot be found).
|
63 | 67 | config.i18n.fallbacks = true
|
64 | 68 |
|
65 |
| - # Don't log any deprecations. |
66 |
| - config.active_support.report_deprecations = false |
| 69 | + # Send deprecation notices to registered listeners. |
| 70 | + config.active_support.deprecation = :notify |
| 71 | + |
| 72 | + # Log disallowed deprecations. |
| 73 | + config.active_support.disallowed_deprecation = :log |
| 74 | + |
| 75 | + # Tell Active Support which deprecation messages to disallow. |
| 76 | + config.active_support.disallowed_deprecation_warnings = [] |
| 77 | + |
| 78 | + # Use default logging formatter so that PID and timestamp are not suppressed. |
| 79 | + config.log_formatter = ::Logger::Formatter.new |
67 | 80 |
|
68 |
| - # Enable DNS rebinding protection and other `Host` header attacks. |
69 |
| - # config.hosts = [ |
70 |
| - # "example.com", # Allow requests from example.com |
71 |
| - # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
72 |
| - # ] |
73 |
| - # Skip DNS rebinding protection for the default health check endpoint. |
74 |
| - # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
| 81 | + # Use a different logger for distributed setups. |
| 82 | + # require "syslog/logger" |
| 83 | + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") |
75 | 84 |
|
76 | 85 | if ENV["RAILS_LOG_TO_STDOUT"].present?
|
77 | 86 | logger = ActiveSupport::Logger.new($stdout)
|
|
0 commit comments