From 9d17f6a7f49858317990af9ba601c131f3b43ef2 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 18 Apr 2020 19:11:03 +0200 Subject: [PATCH] removed anonymous function to generate ca Signed-off-by: Philip Molares Signed-off-by: David Mehren --- lib/app.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/app.ts b/lib/app.ts index 1ac7e0e25..e360da7ca 100644 --- a/lib/app.ts +++ b/lib/app.ts @@ -34,13 +34,11 @@ const rootPath = path.join(__dirname, '..') const app = express() let server: any = null if (config.useSSL) { - const ca = (function (): string[] { - const results: string[] = [] - for (const path of config.sslCAPath) { - results.push(fs.readFileSync(path, 'utf8')) - } - return results - })() + const ca: string[] = [] + for (const path of config.sslCAPath) { + ca.push(fs.readFileSync(path, 'utf8')) + } + const options = { key: fs.readFileSync(config.sslKeyPath, 'utf8'), cert: fs.readFileSync(config.sslCertPath, 'utf8'),