OkComputer.mount_at = "health" OkComputer.require_authentication(*ENV["HEALTHCHECK_AUTH"].to_s.split(":")) if ENV["HEALTHCHECK_AUTH"].present? OkComputer::OkComputerController.class_eval do force_ssl except: :index if ENV["HEALTHCHECK_SSL"] == true end OkComputer::Registry.register "solr", OkComputer::SolrCheck.new(ENV["SOLR_URL"]) OkComputer::Registry.register "redis", OkComputer::RedisCheck.new(url: ENV["REDIS_URL"]) if ActionMailer::Base.smtp_settings[:address].present? OkComputer::Registry.register "mailer", OkComputer::ActionMailerCheck.new(ActionMailer::Base) OkComputer.make_optional %w(mailer) end