diff --git a/src/makeline-service/mongodb.go b/src/makeline-service/mongodb.go index 6f5b81de..843d1689 100644 --- a/src/makeline-service/mongodb.go +++ b/src/makeline-service/mongodb.go @@ -2,6 +2,7 @@ package main import ( "context" + "crypto/tls" "log" "net/http" "os" @@ -49,9 +50,10 @@ func connectToMongoDB() (*mongo.Collection, error) { clientOptions = options.Client().ApplyURI(mongoUri). SetAuth(options.Credential{ AuthSource: mongoDb, - Username: mongoUser, - Password: mongoPassword, - }) + Username: mongoUser, + Password: mongoPassword, + }). + SetTLSConfig(&tls.Config{InsecureSkipVerify: false}) } mongoClient, err := mongo.Connect(ctx, clientOptions)