Add redis-url and redis-insecure-tls command line options

A URL can contain all of the information in the individual flags as a
single string rather than as separate pieces. I've mostly run into URLs
pointing to Redis and this make those existing URLs easier to work with.

This also introduces the -redis-insecure-tls flag which turns off TLS
certificate hostname verification. We've chosen Heroku Redis for a
recent project which requires TLS but, for reasons I don't know, they
don't provide a certificate that is valid for the hostname. I also
wasn't able to get the existing -redis-tls flag to work.
This commit is contained in:
Chris Gaffney
2021-04-23 22:58:32 -04:00
committed by Ken Hibino
parent 034026507b
commit 5cd001daee
2 changed files with 53 additions and 23 deletions

View File

@@ -30,7 +30,7 @@ func newRedisInfoHandlerFunc(rdb *redis.Client) http.HandlerFunc {
}
info := parseRedisInfo(res)
resp := RedisInfoResponse{
Addr: flagRedisAddr,
Addr: rdb.Options().Addr,
Info: info,
RawInfo: res,
}