Make SSL/error settings configurable via env vars
This commit is contained in:
@@ -10,7 +10,7 @@ Rails.application.configure do
|
|||||||
config.eager_load = true
|
config.eager_load = true
|
||||||
|
|
||||||
# Full error reports are disabled.
|
# 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.
|
# Turn on fragment caching in view templates.
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
@@ -25,7 +25,7 @@ Rails.application.configure do
|
|||||||
config.active_storage.service = :local
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
# 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.
|
# 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"
|
config.force_ssl = ENV.fetch("RAILS_FORCE_SSL", "false") == "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user