lib/config: use path.resolve
instead of path.join
While paths like `tmpPath` could previously be configured, they were all interpreted relative to `appRootPath` because of `path.join`. Now the configurable paths can be canonical and therefore independent of the `appRootPath`. Signed-off-by: WilliButz <wbutz@cyberfnord.de>
This commit is contained in:
parent
e48852e0e2
commit
556783ffad
1 changed files with 13 additions and 13 deletions
|
@ -174,20 +174,20 @@ config.sslCAPath.forEach(function (capath, i, array) {
|
|||
array[i] = path.resolve(appRootPath, capath)
|
||||
})
|
||||
|
||||
config.sslCertPath = path.join(appRootPath, config.sslCertPath)
|
||||
config.sslKeyPath = path.join(appRootPath, config.sslKeyPath)
|
||||
config.dhParamPath = path.join(appRootPath, config.dhParamPath)
|
||||
config.sslCertPath = path.resolve(appRootPath, config.sslCertPath)
|
||||
config.sslKeyPath = path.resolve(appRootPath, config.sslKeyPath)
|
||||
config.dhParamPath = path.resolve(appRootPath, config.dhParamPath)
|
||||
|
||||
config.tmpPath = path.join(appRootPath, config.tmpPath)
|
||||
config.defaultNotePath = path.join(appRootPath, config.defaultNotePath)
|
||||
config.docsPath = path.join(appRootPath, config.docsPath)
|
||||
config.indexPath = path.join(appRootPath, config.indexPath)
|
||||
config.codimdPath = path.join(appRootPath, config.codimdPath)
|
||||
config.errorPath = path.join(appRootPath, config.errorPath)
|
||||
config.prettyPath = path.join(appRootPath, config.prettyPath)
|
||||
config.slidePath = path.join(appRootPath, config.slidePath)
|
||||
config.constantsPath = path.join(appRootPath, config.constantsPath)
|
||||
config.uploadsPath = path.join(appRootPath, config.uploadsPath)
|
||||
config.tmpPath = path.resolve(appRootPath, config.tmpPath)
|
||||
config.defaultNotePath = path.resolve(appRootPath, config.defaultNotePath)
|
||||
config.docsPath = path.resolve(appRootPath, config.docsPath)
|
||||
config.indexPath = path.resolve(appRootPath, config.indexPath)
|
||||
config.codimdPath = path.resolve(appRootPath, config.codimdPath)
|
||||
config.errorPath = path.resolve(appRootPath, config.errorPath)
|
||||
config.prettyPath = path.resolve(appRootPath, config.prettyPath)
|
||||
config.slidePath = path.resolve(appRootPath, config.slidePath)
|
||||
config.constantsPath = path.resolve(appRootPath, config.constantsPath)
|
||||
config.uploadsPath = path.resolve(appRootPath, config.uploadsPath)
|
||||
|
||||
// make config readonly
|
||||
config = deepFreeze(config)
|
||||
|
|
Loading…
Reference in a new issue