Mercurial > zeropaste
annotate config/environments/production.rb @ 495:92929378413e
Update to latest rails
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 15 Dec 2024 22:18:06 +0900 |
parents | 6cac8fcf8164 |
children |
rev | line source |
---|---|
481 | 1 require "active_support/core_ext/integer/time" |
2 | |
431 | 3 Rails.application.configure do |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
4 # Settings specified here will take precedence over those in config/application.rb. |
0 | 5 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
6 # Code is not reloaded between requests. |
495 | 7 config.enable_reloading = false |
0 | 8 |
495 | 9 # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
10 config.eager_load = true |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
11 |
495 | 12 # Full error reports are disabled. |
13 config.consider_all_requests_local = false | |
14 | |
15 # Turn on fragment caching in view templates. | |
0 | 16 config.action_controller.perform_caching = true |
17 | |
495 | 18 # Cache assets for far-future expiry since they are all digest stamped. |
19 config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } | |
0 | 20 |
431 | 21 # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
485 | 22 # config.asset_host = "http://assets.example.com" |
0 | 23 |
495 | 24 # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
25 config.assume_ssl = true | |
431 | 26 |
0 | 27 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
495 | 28 config.force_ssl = true |
0 | 29 |
495 | 30 # Skip http-to-https redirect for the default health check endpoint. |
31 # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } | |
0 | 32 |
495 | 33 # Log to STDOUT with the current request id as a default log tag. |
467 | 34 config.log_tags = [ :request_id ] |
495 | 35 config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) |
0 | 36 |
495 | 37 # Change to "debug" to log everything (including potentially personally-identifiable information!) |
38 config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") | |
0 | 39 |
495 | 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. | |
47 # config.cache_store = :mem_cache_store | |
0 | 48 |
49 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | |
431 | 50 # the I18n.default_locale when a translation cannot be found). |
0 | 51 config.i18n.fallbacks = true |
52 | |
431 | 53 # Do not dump schema after migrations. |
54 config.active_record.dump_schema_after_migration = false | |
495 | 55 |
56 # Only use :id for inspections in production. | |
57 config.active_record.attributes_for_inspect = [ :id ] | |
58 | |
59 # Enable DNS rebinding protection and other `Host` header attacks. | |
60 # config.hosts = [ | |
61 # "example.com", # Allow requests from example.com | |
62 # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` | |
63 # ] | |
64 # | |
65 # Skip DNS rebinding protection for the default health check endpoint. | |
66 # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } | |
0 | 67 end |