mirror of https://github.com/status-im/codimd.git
fixed sslcapath bug
This commit is contained in:
parent
8112cd6fef
commit
9949795533
|
@ -12,6 +12,6 @@ function getFile (path) {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
sslkeypath: getFile('/run/secrets/key.pem'),
|
sslkeypath: getFile('/run/secrets/key.pem'),
|
||||||
sslcertpath: getFile('/run/secrets/cert.pem'),
|
sslcertpath: getFile('/run/secrets/cert.pem'),
|
||||||
sslcapath: getFile('/run/secrets/ca.pem'),
|
sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
||||||
dhparampath: getFile('/run/secrets/dhparam.pem')
|
dhparampath: getFile('/run/secrets/dhparam.pem')
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,15 @@ config.isLDAPEnable = config.ldap.url
|
||||||
config.isPDFExportEnable = config.allowpdfexport
|
config.isPDFExportEnable = config.allowpdfexport
|
||||||
|
|
||||||
// generate correct path
|
// generate correct path
|
||||||
config.sslcapath = path.join(appRootPath, config.sslcapath)
|
config.sslcapath = (function () {
|
||||||
|
var i, len, results
|
||||||
|
results = []
|
||||||
|
for (i = 0, len = config.sslcapath.length; i < len; i++) {
|
||||||
|
results.push(path.resolve(appRootPath, config.sslcapath[i]))
|
||||||
|
}
|
||||||
|
return results
|
||||||
|
})()
|
||||||
|
|
||||||
config.sslcertpath = path.join(appRootPath, config.sslcertpath)
|
config.sslcertpath = path.join(appRootPath, config.sslcertpath)
|
||||||
config.sslkeypath = path.join(appRootPath, config.sslkeypath)
|
config.sslkeypath = path.join(appRootPath, config.sslkeypath)
|
||||||
config.dhparampath = path.join(appRootPath, config.dhparampath)
|
config.dhparampath = path.join(appRootPath, config.dhparampath)
|
||||||
|
|
Loading…
Reference in New Issue