From 37c2cd073182df959986767afecc72abad1bc472 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 12 Apr 2020 17:45:50 +0200 Subject: [PATCH] config/: Cleanups in defaultSSL.ts and dockerSecret.ts Signed-off-by: David Mehren --- lib/config/defaultSSL.ts | 4 ++-- lib/config/dockerSecret.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config/defaultSSL.ts b/lib/config/defaultSSL.ts index 053932ff5..79b27674f 100644 --- a/lib/config/defaultSSL.ts +++ b/lib/config/defaultSSL.ts @@ -1,10 +1,10 @@ import fs from 'fs' -function getFile (path): string | undefined { +function getFile (path): string { if (fs.existsSync(path)) { return path } - return undefined + return '' } export const defaultSSL = { diff --git a/lib/config/dockerSecret.ts b/lib/config/dockerSecret.ts index 3bf2c47ff..51b232b85 100644 --- a/lib/config/dockerSecret.ts +++ b/lib/config/dockerSecret.ts @@ -9,7 +9,7 @@ function getSecret (secret): string | undefined { return undefined } -export let dockerSecret: { s3: { accessKeyId: string | undefined; secretAccessKey: string | undefined }; github: { clientID: string | undefined; clientSecret: string | undefined }; facebook: { clientID: string | undefined; clientSecret: string | undefined }; google: { clientID: string | undefined; hostedDomain: string | undefined; clientSecret: string | undefined }; sessionSecret: string | undefined; sslKeyPath: string | undefined; twitter: { consumerSecret: string | undefined; consumerKey: string | undefined }; dropbox: { clientID: string | undefined; clientSecret: string | undefined; appKey: string | undefined }; gitlab: { clientID: string | undefined; clientSecret: string | undefined }; imgur: string | undefined; sslCertPath: string | undefined; sslCAPath: string | undefined; dhParamPath: string | undefined; dbURL: string | undefined; azure: { connectionString: string | undefined } } +export let dockerSecret: { s3: { accessKeyId: string | undefined; secretAccessKey: string | undefined }; github: { clientID: string | undefined; clientSecret: string | undefined }; facebook: { clientID: string | undefined; clientSecret: string | undefined }; google: { clientID: string | undefined; hostedDomain: string | undefined; clientSecret: string | undefined }; sessionSecret: string | undefined; sslKeyPath: string | undefined; twitter: { consumerSecret: string | undefined; consumerKey: string | undefined }; dropbox: { clientID: string | undefined; clientSecret: string | undefined; appKey: string | undefined }; gitlab: { clientID: string | undefined; clientSecret: string | undefined }; imgur: string | undefined; sslCertPath: string | undefined; sslCAPath: (string | undefined)[]; dhParamPath: string | undefined; dbURL: string | undefined; azure: { connectionString: string | undefined } } if (fs.existsSync(basePath)) { dockerSecret = { @@ -17,7 +17,7 @@ if (fs.existsSync(basePath)) { sessionSecret: getSecret('sessionsecret'), sslKeyPath: getSecret('sslkeypath'), sslCertPath: getSecret('sslcertpath'), - sslCAPath: getSecret('sslcapath'), + sslCAPath: [getSecret('sslcapath')], dhParamPath: getSecret('dhparampath'), s3: { accessKeyId: getSecret('s3_acccessKeyId'),