Mercurial > rsstweet
comparison config/environments/production.rb @ 254:89f6c0016bab default tip
Update to latest rails
author | nanaya <me@nanaya.net> |
---|---|
date | Tue, 03 Sep 2024 19:21:25 +0900 |
parents | ad6264cca788 |
children |
comparison
equal
deleted
inserted
replaced
253:d726e8b92dd1 | 254:89f6c0016bab |
---|---|
2 | 2 |
3 Rails.application.configure do | 3 Rails.application.configure do |
4 # 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. |
5 | 5 |
6 # Code is not reloaded between requests. | 6 # Code is not reloaded between requests. |
7 config.cache_classes = true | 7 config.enable_reloading = false |
8 | 8 |
9 # Eager load code on boot. This eager loads most of Rails and | 9 # Eager load code on boot. This eager loads most of Rails and |
10 # your application in memory, allowing both threaded web servers | 10 # your application in memory, allowing both threaded web servers |
11 # and those relying on copy on write to perform better. | 11 # and those relying on copy on write to perform better. |
12 # Rake tasks automatically ignore this option for performance. | 12 # Rake tasks automatically ignore this option for performance. |
13 config.eager_load = true | 13 config.eager_load = true |
14 | 14 |
15 # Full error reports are disabled and caching is turned on. | 15 # Full error reports are disabled and caching is turned on. |
16 config.consider_all_requests_local = false | 16 config.consider_all_requests_local = false |
17 config.action_controller.perform_caching = true | 17 config.action_controller.perform_caching = true |
18 | 18 |
19 # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] | 19 # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment |
20 # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). | 20 # key such as config/credentials/production.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 `public/`, relying on NGINX/Apache to do so instead. |
24 # Apache or NGINX already handles this. | 24 # config.public_file_server.enabled = false |
25 config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? | |
26 | 25 |
27 # Enable serving of images, stylesheets, and JavaScripts from an asset server. | 26 # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
28 # config.asset_host = "http://assets.example.com" | 27 # config.asset_host = "http://assets.example.com" |
29 | 28 |
30 # Specifies the header that your server uses for sending files. | 29 # Specifies the header that your server uses for sending files. |
31 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache | 30 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache |
32 # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX | 31 # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX |
33 | 32 |
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 | |
34 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | 37 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
35 # config.force_ssl = true | 38 config.force_ssl = true |
36 | 39 |
37 # Include generic and useful information about system operation, but avoid logging too much | 40 # Skip http-to-https redirect for the default health check endpoint. |
38 # information to avoid inadvertent exposure of personally identifiable information (PII). | 41 # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } |
39 config.log_level = :info | 42 |
43 # Log to STDOUT by default | |
44 config.logger = ActiveSupport::Logger.new(STDOUT) | |
45 .tap { |logger| logger.formatter = ::Logger::Formatter.new } | |
46 .then { |logger| ActiveSupport::TaggedLogging.new(logger) } | |
40 | 47 |
41 # Prepend all log lines with the following tags. | 48 # Prepend all log lines with the following tags. |
42 config.log_tags = [ :request_id ] | 49 config.log_tags = [ :request_id ] |
43 | 50 |
51 # "info" includes generic and useful information about system operation, but avoids logging too much | |
52 # information to avoid inadvertent exposure of personally identifiable information (PII). If you | |
53 # want to log everything, set the level to "debug". | |
54 config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") | |
55 | |
44 # Use a different cache store in production. | 56 # Use a different cache store in production. |
45 # config.cache_store = :mem_cache_store | 57 # config.cache_store = :mem_cache_store |
46 | |
47 # Use a real queuing backend for Active Job (and separate queues per environment). | |
48 # config.active_job.queue_adapter = :resque | |
49 # config.active_job.queue_name_prefix = "rsstweet_production" | |
50 | 58 |
51 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | 59 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
52 # the I18n.default_locale when a translation cannot be found). | 60 # the I18n.default_locale when a translation cannot be found). |
53 config.i18n.fallbacks = true | 61 config.i18n.fallbacks = true |
54 | 62 |
55 # Don't log any deprecations. | 63 # Don't log any deprecations. |
56 config.active_support.report_deprecations = false | 64 config.active_support.report_deprecations = false |
57 | 65 |
58 # Use default logging formatter so that PID and timestamp are not suppressed. | 66 # Enable DNS rebinding protection and other `Host` header attacks. |
59 config.log_formatter = ::Logger::Formatter.new | 67 # config.hosts = [ |
60 | 68 # "example.com", # Allow requests from example.com |
61 # Use a different logger for distributed setups. | 69 # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
62 # require "syslog/logger" | 70 # ] |
63 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") | 71 # Skip DNS rebinding protection for the default health check endpoint. |
64 | 72 # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
65 if ENV["RAILS_LOG_TO_STDOUT"].present? | |
66 logger = ActiveSupport::Logger.new(STDOUT) | |
67 logger.formatter = config.log_formatter | |
68 config.logger = ActiveSupport::TaggedLogging.new(logger) | |
69 end | |
70 end | 73 end |