summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/default.js3
-rw-r--r--lib/config/defaultSSL.js2
-rw-r--r--lib/config/dockerSecret.js3
-rw-r--r--lib/config/environment.js3
-rw-r--r--lib/config/index.js9
5 files changed, 14 insertions, 6 deletions
diff --git a/lib/config/default.js b/lib/config/default.js
index 8d36db02..40803476 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -81,7 +81,8 @@ module.exports = {
},
dropbox: {
clientID: undefined,
- clientSecret: undefined
+ clientSecret: undefined,
+ appKey: undefined
},
google: {
clientID: undefined,
diff --git a/lib/config/defaultSSL.js b/lib/config/defaultSSL.js
index 1f1d5590..362c62a1 100644
--- a/lib/config/defaultSSL.js
+++ b/lib/config/defaultSSL.js
@@ -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')
}
diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js
index ac54fd19..b9116cd3 100644
--- a/lib/config/dockerSecret.js
+++ b/lib/config/dockerSecret.js
@@ -44,7 +44,8 @@ if (fs.existsSync(basePath)) {
},
dropbox: {
clientID: getSecret('dropbox_clientID'),
- clientSecret: getSecret('dropbox_clientSecret')
+ clientSecret: getSecret('dropbox_clientSecret'),
+ appKey: getSecret('dropbox_appKey')
},
google: {
clientID: getSecret('google_clientID'),
diff --git a/lib/config/environment.js b/lib/config/environment.js
index 27e63591..5a297382 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -56,7 +56,8 @@ module.exports = {
},
dropbox: {
clientID: process.env.HMD_DROPBOX_CLIENTID,
- clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
+ clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET,
+ appKey: process.env.HMD_DROPBOX_APPKEY
},
google: {
clientID: process.env.HMD_GOOGLE_CLIENTID,
diff --git a/lib/config/index.js b/lib/config/index.js
index 3ac3de53..d44207bf 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -13,8 +13,10 @@ const debugConfig = {
debug: (env === Environment.development)
}
+const {version} = require(path.join(appRootPath, 'package.json'))
+
const packageConfig = {
- version: '0.5.1',
+ version: version,
minimumCompatibleVersion: '0.5.0'
}
@@ -96,7 +98,10 @@ config.isSAMLEnable = config.saml.idpSsoUrl
config.isPDFExportEnable = config.allowpdfexport
// generate correct path
-config.sslcapath = path.join(appRootPath, config.sslcapath)
+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)