diff --git a/config/environments/production.rb b/config/environments/production.rb index 5ea9ea9ba..de1fa82f2 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -44,7 +44,8 @@ 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(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present? - config.force_ssl = true + config.hosts << "localhost" + config.force_ssl = false config.ssl_options = { redirect: { exclude: -> request { request.path.start_with?('/health') || request.headers["Host"].end_with?('.onion') || request.headers["Host"].end_with?('.i2p') }