mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 12:08:02 -05:00
37c2cd0731
Signed-off-by: David Mehren <dmehren1@gmail.com>
15 lines
395 B
TypeScript
15 lines
395 B
TypeScript
import fs from 'fs'
|
|
|
|
function getFile (path): string {
|
|
if (fs.existsSync(path)) {
|
|
return path
|
|
}
|
|
return ''
|
|
}
|
|
|
|
export const defaultSSL = {
|
|
sslKeyPath: getFile('/run/secrets/key.pem'),
|
|
sslCertPath: getFile('/run/secrets/cert.pem'),
|
|
sslCAPath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
|
dhParamPath: getFile('/run/secrets/dhparam.pem')
|
|
}
|