mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04: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()
|
const app = express()
|
||||||
let server: any = null
|
let server: any = null
|
||||||
if (config.useSSL) {
|
if (config.useSSL) {
|
||||||
const ca = (function (): string[] {
|
const ca: string[] = []
|
||||||
const results: string[] = []
|
for (const path of config.sslCAPath) {
|
||||||
for (const path of config.sslCAPath) {
|
ca.push(fs.readFileSync(path, 'utf8'))
|
||||||
results.push(fs.readFileSync(path, 'utf8'))
|
}
|
||||||
}
|
|
||||||
return results
|
|
||||||
})()
|
|
||||||
const options = {
|
const options = {
|
||||||
key: fs.readFileSync(config.sslKeyPath, 'utf8'),
|
key: fs.readFileSync(config.sslKeyPath, 'utf8'),
|
||||||
cert: fs.readFileSync(config.sslCertPath, 'utf8'),
|
cert: fs.readFileSync(config.sslCertPath, 'utf8'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue