optional ca and dhparams

This commit is contained in:
Adrian Woeltche 2018-06-21 16:45:18 +02:00
parent 4501f71dd8
commit abd788d8f4

View file

@ -41,8 +41,8 @@ app.set('port', port);
let server = (!config.www.https) ? http.createServer(app) : https.createServer({
cert: fs.readFileSync(config.www.cert),
key: fs.readFileSync(config.www.key),
ca: fs.readFileSync(config.www.ca),
dhparams: fs.readFileSync(config.www.dhparams)
ca: config.www.ca ? fs.readFileSync(config.www.ca) : undefined,
dhparams: config.www.dhparams ? fs.readFileSync(config.www.dhparams) : undefined
}, app);
// Check if database needs upgrading before starting the server