Skip to content

Connect to Upstash with TLS #63

@shiny

Description

@shiny

Package version

8.0.1

Describe the bug

When i use ioredis or redis-cli, I can connect to upstash with tls enabled

import { Redis } from "ioredis"

const  redis = new Redis({
    host: 'usw2-renewed-cat-30994.upstash.io',
    port: 30994,
    username: 'default',
    password: '',
    db: 0,
    keyPrefix: '',
    tls: {}
})
console.log(await redis.set('o', 'k'))
redis.disconnect()

But if i configure it in adonis like this, it timed out

        main: {
            host: env.get('REDIS_HOST'),
            port: env.get('REDIS_PORT'),
            username: 'default',
            password: env.get('REDIS_PASSWORD', ''),
            db: 0,
            keyPrefix: '',
            retryStrategy(times) {
                return times > 10 ? null : times * 50
            },
            // enable tls here: https://github.com/redis/ioredis?tab=readme-ov-file#tls-options
            tls: {}
        }

Reproduction repo

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions