Add support for connecting to redis via TLS
Alan Pearce alan@alanpearce.eu
Wed, 27 Nov 2024 22:47:07 +0100
1 files changed, 4 insertions(+), 0 deletions(-)
jump to
M internal/server/tls.go → internal/server/tls.go
@@ -24,6 +24,8 @@ Username string `conf:"default:default"` Password string `conf:"required"` EncryptionKey string `conf:"required"` KeyPrefix string `conf:"default:certmagic"` + TLSEnabled bool `conf:"default:false,env:TLS_ENABLED"` + TLSInsecure bool `conf:"default:false,env:TLS_INSECURE"` } func (s *Server) serveTLS() (err error) { @@ -101,6 +103,8 @@ rs.Username = rc.Username rs.Password = rc.Password rs.EncryptionKey = rc.EncryptionKey rs.KeyPrefix = rc.KeyPrefix + rs.TlsEnabled = rc.TLSEnabled + rs.TlsInsecure = rc.TLSInsecure cfg.Storage = rs err = rs.Provision(caddy.Context{