Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing ssl_params in session_store not working #45

Open
carlosbalsas opened this issue Jul 26, 2023 · 1 comment
Open

Passing ssl_params in session_store not working #45

carlosbalsas opened this issue Jul 26, 2023 · 1 comment

Comments

@carlosbalsas
Copy link

carlosbalsas commented Jul 26, 2023

I have an app in Heroku, I'm trying to do the code below, but seems ssl_params not passing... because I still get the OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 peeraddr=52.214.49.109:23399 state=error: certificate verify failed (self-signed certificate in certificate chain))

Rails.application.config.session_store :redis_store,
                                       url: session_url,
                                       expire_after: 1.day,
                                       key: '_dokspot_session',
                                       domain: domain,
                                       tld_length: tld_length,
                                       secure: secure,
                                       ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }

Any advice?

PS: If I use the cookie_store (default for session_store) it works without a problem so the problem is using Redis with session_store.

@carlosbalsas carlosbalsas changed the title Passing ssl_params in session_store Passing ssl_params in session_store not working Jul 26, 2023
@DaichiSaito
Copy link

How about the code below?

Rails.application.config.session_store :redis_store,
                                       servers: {
                                         url: ENV['REDIS_URL'],
                                         ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
                                       }
                                       expire_after: 1.day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants