Fixed issue for connection settings and ssl prop

This commit is contained in:
Jørgensen 2018-04-11 14:40:05 +02:00 committed by GitHub
parent 9fa9eb42ed
commit b64ad9524f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ module.exports = function (strapi) {
if (!_.isEmpty(authenticationDatabase)) {
connectOptions.authSource = authenticationDatabase;
}
connectOptions.ssl = ssl ? true : false;
connectOptions.ssl = (_.isBoolean(ssl) && ssl) || ssl === 'true';
instance.connect(uri || `mongodb://${host}:${port}/${database}`, connectOptions);