Skip to content

Commit

Permalink
use TLS for redis.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchitrk committed Dec 8, 2024
1 parent 90be19f commit d477103
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion backend/cmd/srv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"crypto/tls"
"flag"
"fmt"
"github.com/redis/go-redis/v9"
Expand Down Expand Up @@ -55,7 +56,10 @@ func run(ctx context.Context) error {
Addr: zyg.RedisAddr(),
Username: zyg.RedisUsername(),
Password: zyg.RedisPassword(),
DB: 0,
TLSConfig: &tls.Config{
InsecureSkipVerify: true,
},
DB: 0,
})

defer func(rdb *redis.Client) {
Expand Down
6 changes: 5 additions & 1 deletion backend/cmd/xsrv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"crypto/tls"
"flag"
"fmt"
"github.com/redis/go-redis/v9"
Expand Down Expand Up @@ -55,7 +56,10 @@ func run(ctx context.Context) error {
Addr: zyg.RedisAddr(),
Username: zyg.RedisUsername(),
Password: zyg.RedisPassword(),
DB: 0,
TLSConfig: &tls.Config{
InsecureSkipVerify: true,
},
DB: 0,
})

defer func(rdb *redis.Client) {
Expand Down

0 comments on commit d477103

Please sign in to comment.