hibiken / asynqmon

Web UI for Asynq task queue
MIT License
609 stars 133 forks source link

TLS config for AWS Elastiscache #258

Open rohitjha941 opened 1 year ago

rohitjha941 commented 1 year ago

I am trying to use TLS to connect to AWS Elasticsearch. I have been using the following configurations with the go client. I am not defining the server name in the config as mentioned below.

redisConnOpt.TLSConfig = &tls.Config{
            MinVersion: tls.VersionTLS12,
}       

The makeTLSConfig makes it mandatory for me to provide a server name, which is not desired here.

func makeTLSConfig(cfg *Config) *tls.Config {
    if cfg.RedisTLS == "" && !cfg.RedisInsecureTLS {
        return nil
    }
    return &tls.Config{
        ServerName:         cfg.RedisTLS,
        InsecureSkipVerify: cfg.RedisInsecureTLS,
    }
}