diff options
author | Starfall <us@starfall.systems> | 2021-04-02 15:04:35 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-04-02 15:04:35 -0500 |
commit | aeb0f34cefd88caaaa51e8250e1f6ddde280c4bb (patch) | |
tree | 15dafdc2cdfd9e78e72e461440b593c3fc89788e /config/environments/production.rb | |
parent | 0f7be4b48947a9edcbb6fb84d5d0fd9150ee0870 (diff) | |
parent | b7ec2a900251410c65ba214b50c1657209285b07 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'config/environments/production.rb')
-rw-r--r-- | config/environments/production.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index bdda469ba..1fd07044a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -44,6 +44,13 @@ Rails.application.configure do # Allow to specify public IP of reverse proxy if it's needed config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split.map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present? + config.force_ssl = true + config.ssl_options = { + redirect: { + exclude: -> request { request.path.start_with?('/health') || request.headers["Host"].end_with?('.onion') } + } + } + # Use the lowest log level to ensure availability of diagnostic information # when problems arise. config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info').to_sym @@ -52,7 +59,7 @@ Rails.application.configure do config.log_tags = [:request_id] # Use a different cache store in production. - config.cache_store = :redis_store, ENV['CACHE_REDIS_URL'], REDIS_CACHE_PARAMS + config.cache_store = :redis_cache_store, REDIS_CACHE_PARAMS # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. |