Make SSL/error settings configurable via env vars

This commit is contained in:
Ubuntu
2026-02-12 15:57:37 +00:00
parent 3316dbc535
commit 944ce01476

View File

@@ -10,7 +10,7 @@ Rails.application.configure do
config.eager_load = true
# Full error reports are disabled.
config.consider_all_requests_local = false
config.consider_all_requests_local = ENV.fetch("RAILS_SHOW_ERRORS", "false") == "true"
# Turn on fragment caching in view templates.
config.action_controller.perform_caching = true
@@ -25,7 +25,7 @@ Rails.application.configure do
config.active_storage.service = :local
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
config.assume_ssl = true
config.assume_ssl = ENV.fetch("RAILS_ASSUME_SSL", "true") == "true"
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = ENV.fetch("RAILS_FORCE_SSL", "false") == "true"