comparison config/environments/production.rb @ 255:eda83610b65c

Update rails and stuff
author nanaya <me@nanaya.net>
date Sun, 15 Dec 2024 22:45:33 +0900
parents 89f6c0016bab
children
comparison
equal deleted inserted replaced
254:89f6c0016bab 255:eda83610b65c
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.enable_reloading = false 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 for better performance and memory savings (ignored by Rake tasks).
10 # your application in memory, allowing both threaded web servers
11 # and those relying on copy on write to perform better.
12 # Rake tasks automatically ignore this option for performance.
13 config.eager_load = true 10 config.eager_load = true
14 11
15 # Full error reports are disabled and caching is turned on. 12 # Full error reports are disabled.
16 config.consider_all_requests_local = false 13 config.consider_all_requests_local = false
14
15 # Turn on fragment caching in view templates.
17 config.action_controller.perform_caching = true 16 config.action_controller.perform_caching = true
18 17
19 # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment 18 # Cache assets for far-future expiry since they are all digest stamped.
20 # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). 19 config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
21 # config.require_master_key = true
22
23 # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
24 # config.public_file_server.enabled = false
25 20
26 # Enable serving of images, stylesheets, and JavaScripts from an asset server. 21 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
27 # config.asset_host = "http://assets.example.com" 22 # config.asset_host = "http://assets.example.com"
28 23
29 # Specifies the header that your server uses for sending files.
30 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
31 # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
32
33 # Assume all access to the app is happening through a SSL-terminating reverse proxy. 24 # 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. 25 config.assume_ssl = true
35 # config.assume_ssl = true
36 26
37 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 27 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
38 config.force_ssl = true 28 config.force_ssl = true
39 29
40 # Skip http-to-https redirect for the default health check endpoint. 30 # Skip http-to-https redirect for the default health check endpoint.
41 # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } 31 # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
42 32
43 # Log to STDOUT by default 33 # Log to STDOUT with the current request id as a default log tag.
44 config.logger = ActiveSupport::Logger.new(STDOUT) 34 config.log_tags = [ :request_id ]
45 .tap { |logger| logger.formatter = ::Logger::Formatter.new } 35 config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
46 .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
47 36
48 # Prepend all log lines with the following tags. 37 # Change to "debug" to log everything (including potentially personally-identifiable information!)
49 config.log_tags = [ :request_id ]
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") 38 config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
55 39
56 # Use a different cache store in production. 40 # Prevent health checks from clogging up the logs.
41 config.silence_healthcheck_path = "/up"
42
43 # Don't log any deprecations.
44 config.active_support.report_deprecations = false
45
46 # Replace the default in-process memory cache store with a durable alternative.
57 # config.cache_store = :mem_cache_store 47 # config.cache_store = :mem_cache_store
58 48
59 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 49 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
60 # the I18n.default_locale when a translation cannot be found). 50 # the I18n.default_locale when a translation cannot be found).
61 config.i18n.fallbacks = true 51 config.i18n.fallbacks = true
62 52
63 # Don't log any deprecations.
64 config.active_support.report_deprecations = false
65
66 # Enable DNS rebinding protection and other `Host` header attacks. 53 # Enable DNS rebinding protection and other `Host` header attacks.
67 # config.hosts = [ 54 # config.hosts = [
68 # "example.com", # Allow requests from example.com 55 # "example.com", # Allow requests from example.com
69 # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` 56 # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
70 # ] 57 # ]
58 #
71 # Skip DNS rebinding protection for the default health check endpoint. 59 # Skip DNS rebinding protection for the default health check endpoint.
72 # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } 60 # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
73 end 61 end