Skip to content

Commit 8375544

Browse files
authored
Merge pull request #636 from laysdra7265/fix/sslcapath
Fix sslcapath bug
2 parents af082d9 + 45976a8 commit 8375544

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ config.isSAMLEnable = config.saml.idpSsoUrl
9696
config.isPDFExportEnable = config.allowpdfexport
9797

9898
// generate correct path
99-
config.sslcapath = path.join(appRootPath, config.sslcapath)
99+
config.sslcapath.forEach(function (capath, i, array) {
100+
array[i] = path.resolve(appRootPath, capath)
101+
})
102+
100103
config.sslcertpath = path.join(appRootPath, config.sslcertpath)
101104
config.sslkeypath = path.join(appRootPath, config.sslkeypath)
102105
config.dhparampath = path.join(appRootPath, config.dhparampath)

0 commit comments

Comments
 (0)