Skip to content

Commit 9949795

Browse files
committed
fixed sslcapath bug
1 parent 8112cd6 commit 9949795

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/config/defaultSSL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ function getFile (path) {
1212
module.exports = {
1313
sslkeypath: getFile('/run/secrets/key.pem'),
1414
sslcertpath: getFile('/run/secrets/cert.pem'),
15-
sslcapath: getFile('/run/secrets/ca.pem'),
15+
sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
1616
dhparampath: getFile('/run/secrets/dhparam.pem')
1717
}

lib/config/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,15 @@ config.isLDAPEnable = config.ldap.url
9595
config.isPDFExportEnable = config.allowpdfexport
9696

9797
// generate correct path
98-
config.sslcapath = path.join(appRootPath, config.sslcapath)
98+
config.sslcapath = (function () {
99+
var i, len, results
100+
results = []
101+
for (i = 0, len = config.sslcapath.length; i < len; i++) {
102+
results.push(path.resolve(appRootPath, config.sslcapath[i]))
103+
}
104+
return results
105+
})()
106+
99107
config.sslcertpath = path.join(appRootPath, config.sslcertpath)
100108
config.sslkeypath = path.join(appRootPath, config.sslkeypath)
101109
config.dhparampath = path.join(appRootPath, config.dhparampath)

0 commit comments

Comments
 (0)