diff options
author | Alan Pearce | 2024-11-27 22:47:07 +0100 |
---|---|---|
committer | Alan Pearce | 2024-11-27 22:47:07 +0100 |
commit | a3dae65bcbf572b02a36996b91d13d49036abb30 (patch) | |
tree | 32dff8b5598b5b74771fe4d748829574702438bd /internal | |
parent | a7b7b026f6279f9cb9104b41580ebe5264c86c9d (diff) | |
download | website-a3dae65bcbf572b02a36996b91d13d49036abb30.tar.lz website-a3dae65bcbf572b02a36996b91d13d49036abb30.tar.zst website-a3dae65bcbf572b02a36996b91d13d49036abb30.zip |
Add support for connecting to redis via TLS
Diffstat (limited to 'internal')
-rw-r--r-- | internal/server/tls.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/server/tls.go b/internal/server/tls.go index 1c1073e..0fb6c48 100644 --- a/internal/server/tls.go +++ b/internal/server/tls.go @@ -24,6 +24,8 @@ type redisConfig struct { 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 @@ func (s *Server) serveTLS() (err error) { 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{ |