mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fixed sslcapath bug
This commit is contained in:
parent
8112cd6fef
commit
9949795533
2 changed files with 10 additions and 2 deletions
|
@ -12,6 +12,6 @@ function getFile (path) {
|
|||
module.exports = {
|
||||
sslkeypath: getFile('/run/secrets/key.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')
|
||||
}
|
||||
|
|
|
@ -95,7 +95,15 @@ config.isLDAPEnable = config.ldap.url
|
|||
config.isPDFExportEnable = config.allowpdfexport
|
||||
|
||||
// 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.sslkeypath = path.join(appRootPath, config.sslkeypath)
|
||||
config.dhparampath = path.join(appRootPath, config.dhparampath)
|
||||
|
|
Loading…
Reference in a new issue