Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func main() {
cache.Instance = cache.NewCache()

logger.Info("Connecting to import S3")
s3.ConnectS3(config.Conf.S3Import.Endpoint, config.Conf.S3Import.AccessKey, config.Conf.S3Import.SecretKey)
s3.ConnectS3(config.Conf.S3Import.Endpoint, config.Conf.S3Import.AccessKey, config.Conf.S3Import.SecretKey, config.Conf.S3Import.Secure)

logger.Info("Initialising microservice clients")
utils.ArchiverClient = archiverclient.NewArchiverClient(archiverclient.NewProxyRetriever(config.Conf.Bot.ObjectStore), []byte(config.Conf.Bot.AesKey))
Expand Down
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type Config struct {
SecureProxyUrl string `env:"SECURE_PROXY_URL"`
S3Import struct {
Endpoint string `env:"ENDPOINT,required"`
Secure bool `env:"SECURE" envDefault:"true"`
AccessKey string `env:"ACCESS_KEY,required"`
SecretKey string `env:"SECRET_KEY,required"`
TranscriptBucket string `env:"TRANSCRIPT_BUCKET,required"`
Expand Down
4 changes: 2 additions & 2 deletions s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (

var S3Client *minio.Client

func ConnectS3(endpoint, accessKey, secretKey string) {
func ConnectS3(endpoint, accessKey, secretKey string, secure bool) {
// Initialize minio client object.
minioClient, err := minio.New(endpoint, &minio.Options{
Creds: credentials.NewStaticV4(accessKey, secretKey, ""),
Secure: true,
Secure: secure,
})
if err != nil {
log.Fatalln(err)
Expand Down