mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 07:56:01 +00:00
fix: connection ssl require file path instread of file content
This commit is contained in:
@@ -68,10 +68,11 @@ const driver = {
|
||||
};
|
||||
if (ssl) {
|
||||
options.tls = true;
|
||||
options.tlsCAFile = ssl.ca;
|
||||
options.tlsCertificateKeyFile = ssl.cert || ssl.key;
|
||||
options.tlsCAFile = ssl.sslCaFile;
|
||||
options.tlsCertificateKeyFile = ssl.sslCertFile || ssl.sslKeyFile;
|
||||
options.tlsCertificateKeyFilePassword = ssl.password;
|
||||
options.tlsAllowInvalidCertificates = !ssl.rejectUnauthorized;
|
||||
options.tlsInsecure = !ssl.rejectUnauthorized;
|
||||
}
|
||||
|
||||
const pool = new MongoClient(mongoUrl, options);
|
||||
|
||||
Reference in New Issue
Block a user