removed anonymous function to generate ca

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
Philip Molares 2020-04-18 19:11:03 +02:00 committed by David Mehren
parent e015234aaf
commit 9d17f6a7f4
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -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'),