diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-03-24 10:53:50 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-03-24 10:53:50 +0100 |
commit | f60c99a8fb0c99554fce091cac61d9ed07eef573 (patch) | |
tree | 27457a4e091b820269daedb2f709ca304bcf5d06 /config/environments | |
parent | d7c1c41859549212a6d34ad869fded16acc17b48 (diff) | |
parent | 88d69d3261c2f02278d07dc302ff7fc15bd68e8c (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'config/environments')
-rw-r--r-- | config/environments/production.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index 248ea6ee0..8d811451c 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 |