MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.69k stars 401 forks source link

SSL error for Heroku Redis #542

Closed nbashaw closed 1 year ago

nbashaw commented 1 year ago

Heroku Redis has a problem with self-signed certificates: https://help.heroku.com/HC0F8CUS/redis-connection-issues

In order to get Rack Mini Profiler to work, I had to add this to my config/initializers/mini_profiler.rb file:

if Rails.env.production?
  Rack::MiniProfiler.config.storage_options = { 
    url: ENV["REDIS_URL"],
    ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
  }
  Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore
end

Might be helpful to add this to the README, as I suspect a lot of people might run into a similar issue? Or if there is a better fix that doesn't skip SSL verification, I would love to use that, but I haven't been able to figure it out yet.

nate-at-gusto commented 1 year ago

Wow. To be honest I'm a bit shocked that this is Heroku's official solution.

nbashaw commented 1 year ago

Yeah I'm on the verge of switching to Render. Curious if you have any recommended alternatives?