From d4a609209df6cfc1086b0618165c5267b1fc8e06 Mon Sep 17 00:00:00 2001 From: Ilgiz Mustafin Date: Thu, 31 Oct 2024 20:34:58 +0100 Subject: [PATCH] Add heroku redis ssl configs --- config/initializers/heroku_redis.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 config/initializers/heroku_redis.rb diff --git a/config/initializers/heroku_redis.rb b/config/initializers/heroku_redis.rb new file mode 100644 index 0000000..59c4466 --- /dev/null +++ b/config/initializers/heroku_redis.rb @@ -0,0 +1,17 @@ +# Redis on Heroku needs no ssl +# https://devcenter.heroku.com/articles/connecting-heroku-redis#connecting-in-ruby +$redis = Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }) + +Sidekiq.configure_server do |config| + config.redis = { + url: ENV["REDIS_URL"], + ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } + } +end + +Sidekiq.configure_client do |config| + config.redis = { + url: ENV["REDIS_URL"], + ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } + } +end