redis_dashboard icon indicating copy to clipboard operation
redis_dashboard copied to clipboard

Unable to use with rediss urls and self-signed certificates

Open prognostikos opened this issue 1 year ago • 1 comments

Right now the redis client will not work with rediss urls if the redis server presents a self-signed certificate. This is the case for e.g. Heroku Redis. The following error is raised:

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=x.x.x.x:20229 state=error: certificate verify failed (self signed certificate in certificate chain)

To enable this we can pass an additional parameter when calling Redis.new e.g.

Redis.new(
  url: ENV["REDIS_URL"],
  ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
)

Would you accept a pull request to add a configuration option for this? Let me know if you have a preference as to what the configuration API should look like.

prognostikos avatar Jan 13 '23 09:01 prognostikos