feat(mongodb): support for mongodb secure connections with ssl certificates (#1472)

Fixes #1349
This commit is contained in:
Liran Tal
2016-09-04 01:29:28 +03:00
committed by GitHub
parent cf246babd1
commit c0f6cb3e4d
2 changed files with 17 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
'use strict';
var fs = require('fs');
module.exports = {
secure: {
ssl: true,
@@ -15,6 +17,20 @@ module.exports = {
options: {
user: '',
pass: ''
/**
* Uncomment to enable ssl certificate based authentication to mongodb
* servers. Adjust the settings below for your specific certificate
* setup.
server: {
ssl: true,
sslValidate: false,
checkServerIdentity: false,
sslCA: fs.readFileSync('./config/sslcerts/ssl-ca.pem'),
sslCert: fs.readFileSync('./config/sslcerts/ssl-cert.pem'),
sslKey: fs.readFileSync('./config/sslcerts/ssl-key.pem'),
sslPass: '1234'
}
*/
},
// Enable mongoose debug mode
debug: process.env.MONGODB_DEBUG || false

View File

@@ -56,7 +56,7 @@
"lusca": "~1.4.1",
"method-override": "~2.3.5",
"mocha": "~3.0.2",
"mongoose": "~4.4.8",
"mongoose": "~4.5.10",
"morgan": "~1.7.0",
"multer": "~1.2.0",
"nodemailer": "~2.5.0",