Skip to content

rejectUnauthorized not working anymore with new Redis version #1767

@p-real96

Description

@p-real96

Since our app is deployed on Heroku which is using self signed certificates I need to disable certificate verification...
This is what we were using previously:

     var client = redis.createClient({
        url: process.env.REDIS_URL,
        tls: {
            rejectUnauthorized: false
        }
    }); 

And I have now changed it to this:

    var client = redis.createClient({
        url: process.env.REDIS_URL,
        socket: {
            tls: true
        },
        tls: {
            rejectUnauthorized: false
        }
    });

But its not taking the options into account 😒
Had a look at the new node-redis documentation: https://www.npmjs.com/package/redis
Which has lead me to the createClient config: https://github.com/redis/node-redis/blob/HEAD/docs/client-configuration.md
And this one has lead me to the tls connection options: https://nodejs.org/api/tls.html#tls_tls_connect_options_callback

But I'm really struggeling about how to pass those TLS configurations into the createClient config... Anyone out there to help me?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions