mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-20 01:25:01 +00:00
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:
parent
e015234aaf
commit
9d17f6a7f4
1 changed files with 5 additions and 7 deletions
12
lib/app.ts
12
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'),
|
||||
|
|
Loading…
Reference in a new issue