mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 08:28:22 +00:00
refactor(mongodb-credentials): streamline SSL configuration and update documentation references
This commit is contained in:
+2
-6
@@ -81,13 +81,9 @@ export const mongodbCredentialsRotationFactory: TRotationFactory<
|
||||
directConnection: !isSrv
|
||||
};
|
||||
|
||||
// SSL is enabled if explicitly enabled OR if using SRV (which requires TLS) and requireTlsForSrv is true
|
||||
if (connection.credentials.sslEnabled) {
|
||||
if (connection.credentials.sslCertificate) {
|
||||
clientOptions.tls = true;
|
||||
clientOptions.tlsInsecure = !connection.credentials.sslRejectUnauthorized;
|
||||
if (connection.credentials.sslCertificate) {
|
||||
clientOptions.ca = connection.credentials.sslCertificate;
|
||||
}
|
||||
clientOptions.ca = connection.credentials.sslCertificate;
|
||||
}
|
||||
|
||||
const client = new MongoClient(uri, clientOptions);
|
||||
|
||||
Reference in New Issue
Block a user