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 . cache_classes = true
7
+ config . enable_reloading = false
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
13
13
config . eager_load = true
14
14
15
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
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"]
20
- # or in config/master .key. This key is used to decrypt credentials (and other encrypted files).
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).
21
21
# config.require_master_key = true
22
22
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
23
+ # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
25
24
config . public_file_server . enabled = ENV [ 'RAILS_SERVE_STATIC_FILES' ] . present?
26
25
27
26
# Compress CSS using a preprocessor.
30
29
# Compress JS using a preprocessor.
31
30
config . assets . js_compressor = :terser
32
31
33
- # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ # Do not fall back to assets pipeline if a precompiled asset is missed.
34
33
config . assets . compile = false
35
34
36
35
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
43
42
# Store uploaded files on the local file system (see config/storage.yml for options).
44
43
config . active_storage . service = :local
45
44
45
+ # Assume all access to the app is happening through a SSL-terminating reverse proxy.
46
+ # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
47
+ # config.assume_ssl = true
48
+
46
49
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
47
50
# config.force_ssl = true
48
51
49
- # Include generic and useful information about system operation, but avoid logging too much
50
- # information to avoid inadvertent exposure of personally identifiable information (PII).
51
- config . log_level = ENV . fetch ( "RAILS_LOG_LEVEL" ) { "info" }
52
+ # Log to STDOUT by default
53
+ config . logger = ActiveSupport ::Logger . new ( STDOUT )
54
+ . tap { |logger | logger . formatter = ::Logger ::Formatter . new }
55
+ . then { |logger | ActiveSupport ::TaggedLogging . new ( logger ) }
52
56
53
57
# Prepend all log lines with the following tags.
54
58
config . log_tags = [ :request_id ]
55
59
60
+ # "info" includes generic and useful information about system operation, but avoids logging too much
61
+ # information to avoid inadvertent exposure of personally identifiable information (PII). If you
62
+ # want to log everything, set the level to "debug".
63
+ config . log_level = ENV . fetch ( "RAILS_LOG_LEVEL" , "info" )
64
+
56
65
# Use a different cache store in production.
57
66
# config.cache_store = :mem_cache_store
58
67
59
68
# Use a real queuing backend for Active Job (and separate queues per environment).
60
- # config.active_job.queue_adapter = :resque
69
+ # config.active_job.queue_adapter = :resque
61
70
# config.active_job.queue_name_prefix = "planner_#{Rails.env}"
62
71
63
72
config . action_mailer . perform_caching = false
73
82
# Don't log any deprecations.
74
83
config . active_support . report_deprecations = false
75
84
76
- # Use default logging formatter so that PID and timestamp are not suppressed.
77
- config . log_formatter = ::Logger ::Formatter . new
78
-
79
- # Use a different logger for distributed setups.
80
- # require "syslog/logger"
81
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
-
83
- if ENV [ "RAILS_LOG_TO_STDOUT" ] . present?
84
- logger = ActiveSupport ::Logger . new ( STDOUT )
85
- logger . formatter = config . log_formatter
86
- config . logger = ActiveSupport ::TaggedLogging . new ( logger )
87
- end
88
-
89
85
# Do not dump schema after migrations.
90
86
config . active_record . dump_schema_after_migration = false
91
87
92
- # Required default host to link to!
93
- config . action_mailer . default_url_options = { host : 'codebar.io' }
88
+ # Enable DNS rebinding protection and other `Host` header attacks.
89
+ # config.hosts = [
90
+ # "example.com", # Allow requests from example.com
91
+ # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
92
+ # ]
94
93
95
- # Ignore bad email addresses and do not raise email delivery errors.
96
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
97
- # config.action_mailer.raise_delivery_errors = false
94
+ # Skip DNS rebinding protection for the default health check endpoint.
95
+ # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
98
96
99
97
config . action_mailer . smtp_settings = {
100
98
port : '587' ,
106
104
enable_starttls_auto : true
107
105
}
108
106
ActionMailer ::Base . delivery_method = :smtp
109
- end
107
+ config . action_mailer . default_url_options = { host : 'codebar.io' }
108
+ end
0 commit comments